Page 1 of 1

Job in running status, invoked again due to scheduler

Posted: Thu May 06, 2010 3:58 am
by harryhome
Hi

In 8.1, We are scheduling jobs to run at perticular time daily. What will happen if some job takes more than 24 hr on a particular, then in next schedule when it gets invoked again, it will be already in running state. what will happen to next run then?

Posted: Thu May 06, 2010 4:25 am
by priyadarshikunal
It won't get invoked.

But thats where Job Control, Scripts, Enterprise scheduler comes in to picture. Out of curiosity, why you want to schedule a job daily which may take more than 24 hrs?

Posted: Thu May 06, 2010 4:31 am
by harryhome
Actually Job will not take 24 hrs normally but in worst case if data is huge then we need to know how it goes for next day schedule. If its not getting invoked then its status will not be aborted, right?

Posted: Thu May 06, 2010 4:41 am
by ray.wurlod
DataStage will not permit a job - other than a multi-instance job with a different invocation ID - to be started if that job's current status is Running. The error code is DSJE.BADSTATE.

Posted: Thu May 06, 2010 4:41 am
by Sainath.Srinivasan
The job / sequence will fail as it cannot initiate the child job.

Why don'y you use the multi-instance property ? Ofcourse you need to change the dataset names appropriately and pass correct date ranges.

Alternatively, you can include the job in a sequence with a 24hr sleep and the job both joining into a sequencer with ALL as its property. The 24 hr sleep must have its own cycle.

Also you can create a multi-instance sequence that will be initiated everyday which will check the status of previous sequence to be 'Finished'.

Posted: Thu May 06, 2010 4:46 am
by priyadarshikunal
Scheduler wont be able to Start the job. In such cases while in sequences, you get error 'Job not in runnable state (compiled not running)' or similar. But when its from the scheduler, you wont get error and however the DSJob command will exit with error.

Its easy to verify the same! Schedule a job which takes atleast 10 mins twice with 5 min difference.