Schedule Model Refreshes for a window of time
Hello,
Is it possible to schedule a model refresh every M - F between 8 AM and 6 PM every 15 mins ?
I know I can setup multiple schedules one every Mon every 15 mins, etc
Trying to see if I can do it via 1 schedule
Based on what I see below,
- I can schedule hourly jobs on week days that will run 24 hours
- I can setup a job to run every 15 mins all the time
M - F hourly
Every 15 mins
Thanks
Mad
6 replies
-
I believe this cannot be done with the built in scheduler.
However, you can call schedule executions via API. In which case, create your bespoke app, with your own timing logic that triggers a schedule programmatically - and now you can do whatever you want.
If this is too much, perhaps put in a product suggestion.
-
Hi ,
There is another option, it's not ideal but it is simpler:
You can create a schedule that runs every 15 minutes, and in the master flow create a condition that checks the day of week and hour, and if the hour isn't in the range it continues to run the data flow, otherwise it just ends.
In the master flow add a conditional:
and in it try the PQL script:
Hour(datetime()) >=8 and Hour(datetime()) <=17 and ConvertToNumber(dateformat(datetime(),"e")) >= 2 /*may be 1 in your case, I think it varies absed on locale*/ and ConvertToNumber(dateformat(datetime(),"e")) <= 6
notice the day of week may vary (for me Sunday is 1, I think it may vary between environments).
This will run every 15 minutes, but outside of the desired schedule it will immediately terminate.