1. Home
  2. Computing & Technology
  3. Focus on Linux

From Authors, for About.com

      same as @daily

    • @hourly --- same as 0 * * * *

    Prev

    Note that * (asterisk) is used to mean anything (similar to the wildcard). For example if you leave the day part (the 5th place) with an asterisk it would mean everyday.

    Lists are allowed. A list is a set of numbers (or ranges) separated by commas. Examples: ''1,2,5,9'', ''0-4,8-12".

    Step values can be used in conjunction with ranges. Following a range with ''/<number>'' specifies skips of the number's value through the range. For example, ''0-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is ''0,2,4,6,8,10,12,14,16,18,20,22''). Steps are also permitted after an asterisk, so if you want to say ''every two hours'', just use ''*/2''.

    When writing a crontab entry you simply type in six fields separated by spaces, the first five are those listed in the table (using numbers or letters and numbers as appropriate), the 6th field is the command to be executed and any options, cron will read everything up until the newline.

    Example:


       

    5 4 * * sun echo "run at 5 after 4 every sunday"

    This would run the echo command with the string shown at 4:05 every Sunday.


Notes


   Prev    

This information has come from (without editing) a post on the LinuxChix techtalk mailing list, please see [16] in the Prev for further information.


   Prev    

This information comes from the cron manual page with small additions (no changes to original content), refer to [13] in the Prev for further information.


   Prev    Home    Next
   Working with MS-DOS files         Miscellaneous


Explore Focus on Linux

More from About.com

  1. Home
  2. Computing & Technology
  3. Focus on Linux

©2008 About.com, a part of The New York Times Company.

All rights reserved.