IT Employment

General discussion


RE: Using cron

By frednju ·
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 <dir>/tbkup

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

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums