SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Delayed JobRun

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Delayed JobRun
Author Message
Anson Kibby



Joined: 02 Sep 2003
Posts: 13

Post Delayed JobRun Reply with quote

I'm having trouble figuring out how to have one job run another, but I want there to be a 7-hour delay before the second one starts up. The reason I need this is because the two jobs cross a date boundary and they are affected by bank holidays, so I need them to be coordinated together, rather than separately scheduled.

Thu Oct 16, 2003 5:22 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7966

Post Re: Delayed JobRun Reply with quote

Create 3 jobs. 2 jobs with no schedules ([no schedule] for schedule) and 1 job scheduled to run and control other 2 jobs. That job should be of script type
and have script code like

JobRun "1st job name here"
Wait 25200
JobRun "2nd job name here"

This will start second job 7 hours after the first job completes.
In case if you need to your start second job 7 hours after start of the first job use script like the following

Dim Timer1, number
Dim Timer2, Number
Dim WaitTime, Number

// run first job and calculate job duration
Timer 0, Timer1
JobRun "1st job name here"
Timer Timer1, Timer2
// convert from milliseconds to seconds
Divide Timer2, 1000, Timer2

// calculate how long to wait before launching next job
// 7 hours is the same as 7*60*60 = 25200 seconds
Subtract 25200, Timer2, WaitTime

Wait WaitTime

// run second job
JobRun "2nd job name here"

: I'm having trouble figuring out how to have one job run another, but I want
: there to be a 7-hour delay before the second one starts up. The reason I
: need this is because the two jobs cross a date boundary and they are
: affected by bank holidays, so I need them to be coordinated together,
: rather than separately scheduled.

Thu Oct 16, 2003 7:36 pm 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.