If both fields are restricted (ie, aren't *), the command will be run when either field matches the current time. Note: The day of a command's execution can be specified by two fields - day of month, and day of week. Percent-signs (%) in the command, unless escaped with backslash (), will be changed into newline characters, and all data after the first % will be sent to the command as standard input. The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the cronfile. The "sixth" field (the rest of the line) specifies the command to be run. Ranges or lists of names are not allowed. Use the first three letters of the particular day or month (case doesn't matter). Names can also be used for the "month" and "day of week" fields. Steps are also permitted after an asterisk, so if you want to say "every two hours", just use "*/2". 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"). Following a range with "" specifies skips of the number's value through the range. Step values can be used in conjunction with ranges. A list is a set of numbers (or ranges) separated by commas. For example, 8-11 for an "hours" entry specifies execution at hours 8, 9, 10 and 11. Ranges are two numbers separated with a hyphen. A field may be an asterisk (*), which always stands for "first-last".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |