How to limit scheduled job to run only during business hours

For technical support visit http://support.2brightsparks.com/
azubarev
Newbie
Newbie
Posts: 2
Joined: Tue Oct 24, 2017 6:23 pm

How to limit scheduled job to run only during business hours

Postby azubarev » Tue Oct 24, 2017 6:42 pm

I have scheduled job which runs every 15 minutes (every day, 24 hours a day). I need to limit it to run only during specific time frame (lets say, every 15 minutes during business hours 8am till 5pm) and do NOT run off specified hours.
Any help / suggestion / ideas, please.

Thank you.

cliffhanger
Expert
Expert
Posts: 752
Joined: Tue May 31, 2011 5:59 pm

Re: How to limit scheduled job to run only during business hours

Postby cliffhanger » Wed Oct 25, 2017 10:48 am

Hi, assuming you only want it to run Monday to Friday (?) then you need to

  • open the Schedule dialog and click the Weekly radio-button
  • check/edit the default Start date shown to suit the day you want the new regime to start from (the suggested default is often inappropriate, but also easy to miss, so be sure to check/edit)
  • edit the default Start time to 08:00
  • leave the default 'Recur every [1] week' setting as it is
  • tick the Monday through Friday checkboxes (leaving Saturday/Sunday unticked)
  • click the Repeating tab, click the 'Run this profile every' checkbox and set the values as
  • 'Every' 0 days, 0 hours, 15 minutes, 0 seconds 'for a Duration of' 0 days, 9 hours, 0 minutes, 0 seconds
Bear in mind the Start time takes care of the 0800 run and a Duration of 9 hours covers the period 0815-1700. Do not tick the 'Indefinitely' option or you will switch out the Duration limit of 9 hours and achieve exactly the frequency you have now (running all night/weekend, etc).

Beware the Day values being set to 1 by default by the Windows Task Scheduler rules. Note that the settings you can see are a subset of the MS-defined defaults/options. There is no Scheduler in SyncBack, it is a drill-down into the Windows Task Scheduler.

If your PC may sleep, hibernate, etc. (for example during lunchtime), give some thought to enabling the option 'Wake the computer to run this task' (on the Misc tab). This option should also wake the PC (if it is sleeping) at 07:59 etc.

I would suggest do not enable the '\run ASAP after missed' setting (also on Misc tab), as you only have 15 minutes gap before the Task will trigger again by the timers anyway.

If you have difficulty getting your head around the settings, it may help to think of it as two loops, where Recur[rence] is the [more or less mandatory] outer loop, and Repeat is the [optional] inner loop. Your use-case needs both because you want/need two cycles, a Weekly (on certain days) cycle and an Every 15 Minutes (for a certain period) 'within' that outer Weekly (certain-days) cycle.

azubarev
Newbie
Newbie
Posts: 2
Joined: Tue Oct 24, 2017 6:23 pm

Re: How to limit scheduled job to run only during business hours

Postby azubarev » Wed Oct 25, 2017 12:57 pm

Thank you! That's exactly what I needed.
Have a great day!


Return to “SyncBackPro (commercial)”



Who is online

Users browsing this forum: No registered users and 2 guests