I have a crontab scheduling many things on an Ubuntu server which runs on UTC time. Some of the scripts being run are time sensitive in relation to the web applications they are providing functionality for.
e.g. Something has to be updated at 4pm every day, as the end users see it by their clock.
This is not an issue during the winter when the UK is on GMT, but from April to October, the clocks go forward an hour for British Summer Time (BST). The scripts running on the server then update the web application at what appears to be 5pm for the users, instead of 4pm.
Is there a way to conditionally adjust the crontab's scheduled times for this time zone change?
The intention below is to run on the first day of every month at 00:00. During BST, my understanding is that this will run at 01:00 BST during daylight savings:
# m h dom mon dow user command
0 0 1 * * root cd / && run-parts --report /etc/cron.monthly
What options do I have to ensure this always runs at 00:00 during both GMT and BST?
Server Timezone Info
$ timedatectl
Local time: Mon 2021-11-01 22:57:41 UTC
Universal time: Mon 2021-11-01 22:57:41 UTC
RTC time: Mon 2021-11-01 22:57:41
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no