Hi,
The below is not any project requirements.
Due to curiosity, i am asking this..
I am having a simple job(may b either parallel or server job)
i want to make this job to run infinitely..
first time i want to run this job using script or manually .
After that, regardless of the result of the run(it may return 1,2,or 3),
the job has to run again and this loop should be repeated.
Is it possible to achieve this in datastage without using any schedulers like crontab or TWS?
Thanks
making a job to run infinitely
Moderators: chulett, rschirm, roy
making a job to run infinitely
pandeeswaran
Re: making a job to run infinitely
No, you don't. At least not any kind of 'normal' job. Now, that would be perfectly acceptable for a job exposed as a service and is known as "Always On".pandeesh wrote:i want to make this job to run infinitely..
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Sounds like a job for sequencer...
Have you considered calling your job from a sequencer?pandeesh wrote:Hi,
first time i want to run this job using script or manually .
After that, regardless of the result of the run(it may return 1,2,or 3),
the job has to run again and this loop should be repeated.
Is it possible to achieve this in datastage without using any schedulers like crontab or TWS?
viewtopic.php?t=113069
Set up the sequencer to loop on your job.
Your script could launch the sequencer, or you manually launch the sequencer. *shrug* either way, your job will be continuously invoked.
You could also get fancy and add an abort check, e.g. stop looping if some file exists, like "/tmp/abort.dat".
Now, you can make it run daily and run for the vast majority of the day but it really should stop once a day to clear its logs (amongst other things) even if it's only for a minute or two. And I certainly hope you build a way out, some way to shut the loop down on demand. I always poll during each iteration for a semaphore or flag file, if found the loop and thus the job are exited gracefully.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm
I really don't see why you would want to to that unless like chulett says if you wanted a service. Then I would create the datastage job to run as a service.
Otherwise if you really wanted to do it, write a shell script to either execute your job or sequence using dsjob
then
x= 1
y=2
while y > 2
Do
dsjob -...........
check job status
if it failed execute dsjob and reset job
sleep 10
##add any other logic you want here before you run again.
done
I would be carefull if something screws up you cold consume some resource
Otherwise if you really wanted to do it, write a shell script to either execute your job or sequence using dsjob
then
x= 1
y=2
while y > 2
Do
dsjob -...........
check job status
if it failed execute dsjob and reset job
sleep 10
##add any other logic you want here before you run again.
done
I would be carefull if something screws up you cold consume some resource
"Don't let the bull between you and the fence"
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill