I am trying to restrict reload to business timings only in json reload task file while reloading via QRS. However, have been unsuccessful in doing so. I am trying to reload every hour from 9am-5:00 pm on weekdays.
I'm not sure that you can achieve this with the task triggers themselves. On i can think of couple of ways how to emulate such workflow:
- 1 task - set the task to run every hour. In the app script check if the time is between 09:00 and 17:30 and if the day is not weekend. If the condition is false (weekend or <09:00 or >17:30) then fail the script on purpose. The downside is that the task will be in failed state when the condition is false.
- multiple tasks - set the main task to run every hour (no script changes). Create two more apps. The first app will call the Repo API to disable the main task and the second app will enable the main task. Set the disable app task to run at 17:30 on weekdays. Set the enable app task to run at 08:55 (for example) on weekdays.