May 2, 2012
tom

Daily Cron Job Example

Question

I want to run a command daily on an Ubuntu Linux box @ 9:15PM. Is this the correct entry for my crontab?

15 23 * * * <<command>>
Asked by Trent Scott

Answer

The syntax is, the hours not

minute hour dayofmonth month dayofweek     command

Your command will run every day at 23:15 (11:15pm)

9pm is 21 (in 24h writing 12 + 9 = 21)

15 21 * * *  command
Answered by mulaz

Related posts:

  1. What user do scripts in the cron folders run as? (i.e. cron.daily, cron.hourly, etc)
  2. Difference between using crontab and /etc/cron.hourly,daily,weekly
  3. What’s the purpose of cron.daily folder in Ubuntu distro
  4. When does `cron.daily` run?
  5. Can I run a cron job more frequently than every minute?

Leave a comment