Cron format

I’ve been cleaning out a bunch of super old notes this week, and am going to post them on my blog for future reference. In case I incur a head injury and need to memorize the crontab format again, here it is as ascii art:

minute (0-59),
|      hour (0-23),
|      |       day of the month (1-31),
|      |       |       month of the year (1-12),
|      |       |       |       day of the week (0-6 with 0=Sunday).
|      |       |       |       |       command
0      2       *       *       0,4     /etc/cron.d/logchecker

You will probably see a few of these posts hit my blog in the days to come.

1 thought on “Cron format”

  1. What you might find useful information (as I did), is the format of cron.d files. While most googled documentation says that it’s the same format as the crontab files, there is one minor difference. That’s that the user to run the command as must be entered before the command.

    ex.
    0 2 * * 0,4 root /usr/bin/perl /root/compiledoc.pl

Leave a Reply

Your email address will not be published. Required fields are marked *