Search code examples
linuxcron

Which time does the `crontab` listen to? Local, Universal or RTC time?


Following is the result of the command, timedatectl, which lists different "types" of time.

  • Local time
  • Universal time
  • RTC time

Which time do the crontab listen to as my cron-job is not running.

$ timedatectl
                      Local time: Thu 2019-12-26 15:43:38 IST
                  Universal time: Thu 2019-12-26 10:13:38 UTC
                        RTC time: Thu 2019-12-26 10:13:39
                       Time zone: Asia/Kolkata (IST, +0530)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no


Solution

  • As quoted in crontab manual

    "The time used for writing into a log file is taken from the local time zone, where the daemon is running."

    So your cronjob will be running according to your local timezone i.e. Local time.

    You can read more here crontab(5)