RE: Using cron - TechRepublic
General discussion
July 20, 2004 at 02:14 AM
frednju

RE: Using cron

by frednju . Updated 21 years, 11 months ago

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.

This discussion is locked

All Comments