Get your free beta license ↗
Panel and server · cron

A scheduled job runs at the wrong hour

Last updated 30 Nov 2026
Summary

A job set for 03:00 runs hours earlier or later. Cron uses the server's time zone, often UTC on a VPS, so write the schedule in that time zone.

Symptoms

A job runs a whole number of hours before or after the hour you set.

Cause

Cron reads the hours in the crontab in the server's time zone. Many VPS images use UTC.

Resolution

  1. Check the server's time zone.

    timedatectl
  2. Write the job's hours in the time zone shown by timedatectl.

  3. On AlmaLinux, cron reads CRON_TZ, so you can set a time zone for the crontab. Run crontab -u USER -e and add a line such as CRON_TZ=America/Monterrey above the jobs. Ubuntu's cron ignores CRON_TZ.

  4. You can also change the server's time zone. This changes the time zone for every job and every log.

    timedatectl set-timezone America/Monterrey
  5. Run timedatectl again to confirm it shows America/Monterrey.