General discussion

Locked

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.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to IT Employment Forum
1 total post (Page 1 of 1)  

Related Forums