I have a Autosys job which kicks off on 10th of a month.It may take a day or 2 to complete some datastage cycle. Once this is completed i have another job which should kick off after 7 days of completion of datastage cycle.
I have to setup a dependency in autosys such that if the datastage cycle completes on 11th the successor job should kick off on 18th , if the datastage cycle completes on 12th the successor job should kick off on 19th.
Please let me know if there is a way to do this?
Autosys and Wait
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
For the first job use scheduler, may be datastage or some other like cron.
Then in the after job routine for the first job, call a shell script which will take the current date, add 7 days in it and then call cron command to schedule next execution for the job2.
Here for the second job you have to use the dsjob command or script that uses dsjob to schedule second job.
Then in the after job routine for the first job, call a shell script which will take the current date, add 7 days in it and then call cron command to schedule next execution for the job2.
Here for the second job you have to use the dsjob command or script that uses dsjob to schedule second job.
Regards,
S. Kirtikumar.
S. Kirtikumar.
-
- Charter Member
- Posts: 36
- Joined: Thu Jun 10, 2004 11:22 pm
write date to logfile
I'd approach it as follows:
1. DSjob10 (that runs on 10th of month) - writes 1 line of completed date in the text logfile.
2. DSCheck7d - checks if it's been 7d since the last completion.
This job (Job Control in Basic) - read the above file created in step1, check if system date is >= (date in step1 + 7), if not exit straight away.
This way, you can avoid maintaining complicated Autosys jobs
You can have only 1 daily autosys that kicks off DSCheck7d.
1. DSjob10 (that runs on 10th of month) - writes 1 line of completed date in the text logfile.
2. DSCheck7d - checks if it's been 7d since the last completion.
This job (Job Control in Basic) - read the above file created in step1, check if system date is >= (date in step1 + 7), if not exit straight away.
This way, you can avoid maintaining complicated Autosys jobs
You can have only 1 daily autosys that kicks off DSCheck7d.