I have given the below conditions to run every 4 hours during those days, but the problem is the job is running at 01:00, 05:00 and 08:58 on Wednesdays. I expect the job to run at those hours on Thursday and not Wednesday
insert_job: file_watcher.0000.000 job_type: BOX
run_window: "09:00 - 08:59"
Please help me to achieve this.
You will need to create 2 jobs, one that runs on Wednesday at the desired times and one on Thursday at the desired times. No need for the run window.
Can't we do that in a single job as I have 15 jobs similar to this scenario.
I am confused as you have Wednesday in days of week. I would think days of week tuesday and Thursday and start time 4:00, 8:00 12:00 16:00 20:00 and 23:59 ( if you want the midnite run ) . As Lisa said - no run window required.
It is not possible to do this with a single job, but there is an alternate way of doing this that does not require two copies of this box being created.
Create two jobs that set a global environment variable (such as RUN_FILEWATCHER). Have one run at 09:00 on Wednesday to set it to "1" and one that runs at 09:05 on Thursday to set it to "0".
Change the job to have a condition and start times (remove the run window).
Then leverage this global variable for the other 14 jobs with the same condition.
As a reverse, you can use the variable to say when NOT to run the job. We do this for jobs that run 7x24 to prevent them from running during our maintenance window.
The logic is this: The job will schedule itself to run during the next time but then must wait until the GV condition is true. The moment it is set to true, the job runs (which is why you set it to true on Wednesday when you want it to actually run). On Thursday at 13:00, it will try to start but then wait for the GV to be set to true again the following Wednesday.
+1 for creative solution!
Thanks for your suggestion Keith.
Instead of start times, you can try using a run calendar by adding dates in below format.