Cron and DST
2024-10-27
These experiments were done with Vixie Cron on Ubuntu. Other cron implementations may behave differently.
At least for daily and hourly jobs it behaves sensibly.
Cron job which should run daily (in the DST window)
2024-03-30T02:30:01+0100
2024-03-31T03:00:01+0200
2024-04-01T02:30:01+0200
In spring, since 02:30 doesn’t exist, the job runs at the earliest time after that, so at 03:00+0200.
2024-10-26T02:30:01+0200
2024-10-27T02:30:01+0200
In fall, the job runs once, during the first time it’s 02:30.
Cron job which should run hourly
2024-03-31T00:31:01+0100
2024-03-31T01:31:01+0100
2024-03-31T03:31:01+0200
2024-03-31T04:31:02+0200
2024-10-27T00:31:01+0200
2024-10-27T01:31:01+0200
2024-10-27T02:31:01+0200
2024-10-27T02:31:01+0100
2024-10-27T03:31:01+0100
2024-10-27T04:31:01+0100
In both cases the job runs every hour of real time (03:31+0200 is one hour after 01:31+0100 and 02:31+0100 is one hour after 02:31+0200).