4 ms·
Ask HN: AWS Cron vs. Linux Cron When Dealing with DST?
I haven't been able to find a good answer for this. I know there are a lot of people on here much smarter than me. Hopefully someone here can educate or correct me.
My understanding about Linux cron and daylight savings changes, is that Linux will automatically adjust the runtime to account for the change in time between the UTC cron expression and the local timezone set in the OS.
It seems that AWS cron expressions do not make this compensation. I'm not sure why this is. Is this due to the AWS servers using UTC eventhough they are us-east, or that AWS has their own implementation that doesn't handle this?
I see that the standard approach is to create a Lambda that runs during the time change to modify the cron expressions. That just seems clunky to me, especially if Linux already does this adjustment automatically.
I must me missing something. Anyone care to share their thoughts?
- raxxorrax 6y agoNot sure, but all AWS servers I ever run stuff on were always on UTC (Europe), which I really liked. I doubt they have their own Cron implementation, but you might be able to set the time zone just for Cron specifically independent from system time zones.
- giantg2 6y agoThanks for the reply! Everything I saw about cron and timezones is that it is always a UTC and that it can't use a different timezone. I don't think AWS has their own implementation (my fault on the wording), but I would think they have some level of interface between the value I supply and what the server reads. For example, if I have the cron in my ecs.json file, then I would guess that AWS has some code to pick up that value and place it in the correct location on the server. It would be great if we could specify a timezone in the json and have the AWS code translate the cron expression as it deploys it to the server. I would even guess they could reuse or depend on the implementation thats already built in Linux (being open source).