Closed bshih-ixxus closed 7 years ago
Great question Bob. The assumption is the scheduler will run on either every 1, 5 or 15 min intervals. 45 min delta provides 3 retries for 15 min schedule. To avoid costs for an extra hour the stop time should usually be before 59th minute of the hour. I guess changing it from 45 to 59 would make more sense to capture 1 hour schedule also for the lambda.
To avoid confusion, it would also make sense to a provide drop down menu in the CF template to choose from 1, 5, 15 or 60 min schedule.
Thanks again for bringing it up.
Resolved.
Hi,
I have two questions for ec2-scheduler.py and hope that you will explain to me.
(1) What is the logic behind the hardcoded 45min in nowMax as it is not mentioned anywhere? Is it to ensure that it will only start/stop within 45min of the specified start and stop time? What if someone schedules to run it on an hourly/daily basis?
(2) Because of the question above, I can't really see through the logic below:
Append to start list
Append to stop list
If my startTime is 0800 and my instance is stopped , and it is now 15:00, so nowMax = 14:15. It will not be started because "startTime >= str(nowMax)" is not matched.
If my stopTime is 18:00 and my instance is running, and it is now 19:00, so nowMax = 18:15. It will not be stopped because "stopTime >= str(nowMax)" is not matched.
Many thanks in advance.
bob