cron checks the schedule against the machine's clock in the machine's zone (in the Wiki) — that is why the export started at 9:00 UTC.
The TZ=Europe/Moscow line in a schedule file is an ordinary environment variable. cron passes it to the job, and date inside the export writes Moscow time. The minutes and hours of the schedule, though, cron reads in the machine's zone. And so it went: at 9:00 UTC the export started and wrote 12:00 MSK into its log.
There are two ways to fix it. The first is to convert the time in the schedule to the machine's zone; Moscow is UTC+3 all year round. The second is to change the zone of the whole machine with sudo timedatectl set-timezone Europe/Moscow: cron starts reading the schedule in the new zone at once, but every other job and the time in the logs move to Moscow time too. Servers usually stay in UTC: that way the logs of machines in different cities compare without conversion.
Set the export to 9 Moscow time
Make the lab-export export run at 9:00 Moscow time. Leave the machine's zone alone: other jobs on it run in UTC. The schedule is in /etc/cron.d/lab-export.
Goals · 0 of 2
- Schedule the export for 9:00 Moscow time not done yet
- Keep the machine's zone in UTC not done yet