Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Cron

By Will Bontrager
2004-01-09


The Five Schedule Time Fields

The order of the fields might seem backward. Most of us are used to thinking hour before minute, as in 9:45. Also month before day, as in June 21. However, the fields are minute before the hour and day before month, with the day of the week as the fifth field.

Here are the first five fields and their allowed values:

Allowed
Field Values
----- -------
Minute 0-59
Hour 0-23
Day of the Month 1-31
Month 1-12 (also 3-letter month abbr)
Day of the Week 0-7 (also 3-letter day of week abbr)

Each of the above values can also contain ranges, lists, and step values. If a field contains an asterisk (*), it tells cron to accept all allowed values.

Example
-------
Range 1-3
List 3,5,7
Step 15-45/5 (another example: */5)

For explanation, let's assume the above is in the Minute field.

Range 1-3 is a range of 1 through 3, inclusive, and means 1, 2, or 3 minutes after the hour.

List 3,5,7,9 means 3, 5, 7, or 9 minutes after the hour.

Step 15-45/5 means every 5 minutes while the clock is 15 through 45 minutes after the hour, inclusive. Step */5 means every five minutes while the clock is 0 through 59 minutes after the hour (* meaning all allowed values, which would be range 0-59 minutes).

Tutorial Pages:
» Cron
» The Cron Table
» The Five Schedule Time Fields
» Hypothetical Situations
» The Hypothetical Situations Schedules
» The Sixth Field, The Command
» On-line Documentation for cron and crontab
» A Practice Script
» Conclusion


Copyright 2004 Bontrager Connection, LLC


 | Bookmark
Related Tutorials:
» How to Install PHP 5 on Linux
» How to Install Apache 2 on Linux
» How to Install MySQL 5.0 on Linux
» SMB Caching
» Mound --Bind
» Tar Wild Card Interpretation

Ask A Question
characters left.