Interview Prep/Shell Scripting/cron and systemd timers

How do you handle time zones in cron and systemd timers?

IntermediateConceptcron and systemd timers
Answer

Classic cron uses the system time zone (timedatectl); cronie supports CRON_TZ= per crontab. systemd OnCalendar= uses the system time zone unless you append one: OnCalendar=*-*-* 02:30:00 UTC or Asia/Kolkata.

Servers should run in UTC so logs, cron and incident timelines line up, and DST changes do not skip or double-run a 02:30 job. Express business-hour schedules explicitly with a time zone suffix.

All Shell Scripting questions Roadmap: Shell scripting (Bash)

More on cron and systemd timers