The daily job should set some flag after completion which can be checked by the monthly job. The monthly job on startup will check for the flag and continue only after that flag indicates successful completion. There are many ways to implement such dependency. For example, you can use a semaphore file. Here is complete example 1. Daily job is set to start at 5:00 a.m. "On finish" event it is set to create semaphore file "/home/jobs/daily.done" To enable this use the job properties. 2. Monthly job is set to start at 4:55 a.m. "On start" event, it deletes "/home/jobs/daily.done" if the file exists, and then waits for the file to reappear (which indicates successful completion of a daily job) If you are using version 1 or 2 you can use available OS commands and shell script to do the delete and waiting. Select "Run Program" action type for "On start" event. If you are using version 4 you can use the built-in JavaScript to implement the entire thing in the job code without using the "On startup" event, something like the following if (Directory.dir("/home/jobs/daily.done") != "") Process.runAndWait("/bin/rm /home/jobs/daily.done", 0); while (Directory.dir("/home/jobs/daily.done") == "") Scheduler.pause( 30 ); Process.runAndWait("[Your monthly command here]", 0); : We are using the Java Edition of the scheduler, and : we need to be able to specify the following schedule: - A daily job that runs : overnight : - A job that runs on the first working day of the month : , but only when the daily job has completed : Can you specify this kind of schedule?
|