Discussion Locked

RE: Using cron

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

This is a followup to the Linux Tips newsletter regarding cron.

Many people don't realize that you can use tab characters as the whitespace between the cron fields. This allows you to format your cron tables so they are much easier to read. At the top of my cron tables, I put the following heading lines:
# day of
#min hour month month day of week
#(0-59) (0-23) (1-31) (1-12) (0-6, 0=Sun)

Unless you have some exceptionally long fields, you can now use tab characters to line up each field with the heading. For example,

5 3 * * 2-6
/tbkup

Translation: Tuesday thru Saturday at 3:05 AM, run the tbkup script.

1 reply

This discussion is closed to new replies.