Reputation: 939
I have a google script that I need to run every minute during the period 5am-6am.
Within the google scripts interface there is a trigger option that will make the script run every minute for the entire day. However, if I use that option I then get the error message "Service using too much computer time for one day".
How can I adjust my script so that it runs every minute during 5am-6am, but at other times does not run at all?
One idea I had was to just run the script every minute for the whole day, but to have it autoterminate without using up computer time if it wasn't 5am-6am.
Upvotes: 0
Views: 808
Reputation: 1340
Perhaps create two more time triggers one to start the minute timer at 5am and one to end it at 6am. Now keep in mind that Google servers don't start the triggers always at that specific time, it would be between a specific time frame, but consistently that time after that. So set the start to 4am-5am and the stop to 6am-7am. Then add logic to your actual minute trigger to only execute between 5am and 6am.
Upvotes: 1