cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
957
Views
0
Helpful
4
Replies

How to schedule a job at specific times specified by business

Hi

I have a requirement that I need to schedule few jobs at Business specified times

for example at 3:00AM, 7:00AM, 1:00PM, 6:00PM and 9:00 PM. I cannot use repeat at equal interval.

Like this I have to schedule more than 88 jobs at different specific time multiple times a day.

 

I don't want to make 5 jobs instances  to schedule this.

Is there a simple way and  simple for maintenance also, whenever there is request to change this timing I should be abile to reschedule as per the request.

 

Thanks

Easwaran

4 Replies 4

Tyler Theobald
Level 1
Level 1

I don't believe there is a simple way, because I've never known it all these years.  If we ever have a recurring time that isn't consistent, then we've had to create separate jobs as you said. 

Sounds like a lot of administrative overhead for you. 

The only non-simple way I can think of is for all your jobs to have a job variable dependency with "rerun each time dependencies are met" and then you'd have 5 additional jobs that change the variable at those specific times you listed.  The 5 jobs have to change the variable so the dependency is a false, and then true condition each time.

That would work and make it so you don't have to have duplicate jobs.

 

In our case, it was a MSSQL job that we needed to run

We had two MSSQL jobs in a job group to achieve this. The jobgroup is scheduled to run every hour. The MSSQL jobs were

1. The job that returns, lets say TRUE, when the hour = 3:00AM, 7:00AM, 1:00PM, 6:00PM or 9:00 PM. Else returns FALSE

2. This job is dependent on the first job. It had an IF statement in TSQL which ran only if output of the previous job was TRUE

Depending on your need, I believe it could be done for non-SQL scenarios as well

 

Derrick Au
Level 4
Level 4

Hi Easwaran,

 

Oops...re-editing, Tyler is on right track, but this can be achievable without the use of variables.

 

Create trigger jobs for each specified business times: 3:00AM, 7:00AM, 1:00PM, 6:00PM and 9:00 PM

 

These trigger jobs are added as job dependencies to the main job, and when each time trigger job launches at specified time and completes normally, then your main job gets kicked off (when at least one job dependency is met, AND run each time when dependency is met).

 

BR,

Derrick Au

 

 

Easwaran,

Is the driver for these times a file that is created by your business?  (thinking you could schedule a single job with a file dependency and have the job repeat everytime the dependency is met)

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: