AWS instance scheduler for maintenance windows: does (endtime) need to be after (begintime) to work? currently just stopping and not starting

0

Hello there, I'm trying to use scheduler to shutdown a box (on Tuesday of each week say) for an hour at 18:00 and then start it again the same day at 19:00 for a consistent backup before patching lets say. Does the <begintime> string have to be before the <endtime> for scheduler to work correctly? As it seems to work with 'office hours' i.e 'Turned on' at 9:00 'turned off' at 17:30 works. But when off at 18:00 and on at 19:00, it doesn't turn back on. I've also tried a separate schedule with just a shutdown (off at 18:00 Tuesday ) and a separate schedule to turn back on (on 19:00 tuesday ) but this also doesn't work. It just shutdown ok, but then doesn't turn on. Is it waiting until the next Tuesday? (i was trying with 3rd Tuesday of month but reduced to weekly as a test) The EC2 doesn't have an encrypted drive Any help would be amazing Thanks G

mrhyde
질문됨 4달 전431회 조회
2개 답변
0

Thank you both, appreciate the effort. Its a shame as I'm sure peeps would find it useful. I might go with trying the separate lambda first and see which ones least messy, but yes thanks for the logic on the Tuesdays timing, that could work. I'm doing this 3rd Tuesday of month etc, so I will have a play and see who wins :0) Anyone from AWS who wants a project ahem.. 'AWS maintenance scheduler' 'TM' Thanks G

mrhyde
답변함 4달 전
  • If your use-case is narrow (just the one schedule/maintenance period), I would recommend investigating, in order of increasing complexity: EventBridge scheduled Rules, EventBridge Scheduler, or Resource Scheduler (SSM Quick Setup), before implementing something custom. Instance Scheduler is more appropriate if you need centrally managed schedules operating across accounts, regions, and services.

0

Yes, endtime must be after begintime. With the way one-sided periods currently work they are not really appropriate for designating a "not-running" period. You can get the behavior you want by thinking of the inverse of your "not-running" period. The running periods (which are what instance scheduler expects) are all days of the week except Tuesday, from 00:00 to 18:00 on Tuesday, and from 19:00 to 23:59 on Tuesday. With this approach Instance Scheduler will also start your instance at midnight.

AWS
답변함 4달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠