SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Composite Dependancy

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Composite Dependancy
Author Message
Dean Logan Wood



Joined: 04 Aug 2005
Posts: 25

Post Composite Dependancy Reply with quote

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?

Wed Mar 29, 2006 6:42 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7964

Post Re: Composite Dependancy Reply with quote

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?

Wed Mar 29, 2006 10:09 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.