| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: crontab.5,v 1.8 2020/04/17 18:39:31 christos Exp $ | | 1 | .\" $NetBSD: crontab.5,v 1.9 2020/04/17 19:42:14 pgoyette Exp $ |
2 | .\" | | 2 | .\" |
3 | .\"/* Copyright 1988,1990,1993,1994 by Paul Vixie | | 3 | .\"/* Copyright 1988,1990,1993,1994 by Paul Vixie |
4 | .\" * All rights reserved | | 4 | .\" * All rights reserved |
5 | .\" */ | | 5 | .\" */ |
6 | .\" | | 6 | .\" |
7 | .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") | | 7 | .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") |
8 | .\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc. | | 8 | .\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc. |
9 | .\" | | 9 | .\" |
10 | .\" Permission to use, copy, modify, and distribute this software for any | | 10 | .\" Permission to use, copy, modify, and distribute this software for any |
11 | .\" purpose with or without fee is hereby granted, provided that the above | | 11 | .\" purpose with or without fee is hereby granted, provided that the above |
12 | .\" copyright notice and this permission notice appear in all copies. | | 12 | .\" copyright notice and this permission notice appear in all copies. |
13 | .\" | | 13 | .\" |
14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES | | 14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES |
| @@ -131,48 +131,48 @@ The allowed values for the fields are: | | | @@ -131,48 +131,48 @@ The allowed values for the fields are: |
131 | .It Ar command Ta text | | 131 | .It Ar command Ta text |
132 | .El | | 132 | .El |
133 | .Pp | | 133 | .Pp |
134 | Lists are allowed. | | 134 | Lists are allowed. |
135 | A list is a set of numbers (or ranges) separated by commas. | | 135 | A list is a set of numbers (or ranges) separated by commas. |
136 | For example, | | 136 | For example, |
137 | .Dq 1,2,5,9 | | 137 | .Dq 1,2,5,9 |
138 | or | | 138 | or |
139 | .Dq 0\(en4,8\(en12 . | | 139 | .Dq 0\(en4,8\(en12 . |
140 | .Pp | | 140 | .Pp |
141 | Ranges of numbers are allowed. | | 141 | Ranges of numbers are allowed. |
142 | Ranges are two numbers separated with a hyphen. | | 142 | Ranges are two numbers separated with a hyphen. |
143 | The specified range is inclusive. | | 143 | The specified range is inclusive. |
| | | 144 | For example, |
| | | 145 | 8\(en11 for an |
| | | 146 | .Ar hour |
| | | 147 | entry specifies execution at hours 8, 9, 10 and 11. |
144 | .Pp | | 148 | .Pp |
145 | A field may begin with a question mark | | 149 | A field may begin with a question mark |
146 | .Pq Sq \&? , | | 150 | .Pq Sq \&? , |
147 | which indicates a single value randomly selected when the crontab | | 151 | which indicates a single value randomly selected when the crontab |
148 | file is read. | | 152 | file is read. |
149 | If the field contains only a question mark, the value is randomly | | 153 | If the field contains only a question mark, the value is randomly |
150 | selected from the range of all possible values for the field. | | 154 | selected from the range of all possible values for the field. |
151 | If the question mark precedes a range, the value is randomly selected | | 155 | If the question mark precedes a range, the value is randomly selected |
152 | from the range. | | 156 | from the range. |
153 | For example, | | 157 | For example, |
154 | .Dq ? ?2-5 * * * | | 158 | .Dq ? ?2-5 * * * |
155 | specifies that a task will be performed daily between 2:00am and | | 159 | specifies that a task will be performed daily between 2:00am and |
156 | and 5:59am at a time randomly selected when the crontab file is | | 160 | and 5:59am at a time randomly selected when the crontab file is |
157 | first read. | | 161 | first read. |
158 | As just one example, this feature can be used to prevent a large | | 162 | As just one example, this feature can be used to prevent a large |
159 | number of hosts from contacting a server simultaneously and | | 163 | number of hosts from contacting a server simultaneously and |
160 | overloading it by staggering the time at which a download script | | 164 | overloading it by staggering the time at which a download script |
161 | is executed. | | 165 | is executed. |
162 | For example, | | | |
163 | 8\(en11 for an | | | |
164 | .Ar hour | | | |
165 | entry specifies execution at hours 8, 9, 10 and 11. | | | |
166 | .Pp | | 166 | .Pp |
167 | Step values can be used in conjunction with ranges (but not random ranges | | 167 | Step values can be used in conjunction with ranges (but not random ranges |
168 | which represent a single number). | | 168 | which represent a single number). |
169 | Following a range with | | 169 | Following a range with |
170 | .No / Ns Ar number | | 170 | .No / Ns Ar number |
171 | specifies skips of | | 171 | specifies skips of |
172 | .Ar number | | 172 | .Ar number |
173 | through the range. | | 173 | through the range. |
174 | For example, | | 174 | For example, |
175 | .Dq 0\(en23/2 | | 175 | .Dq 0\(en23/2 |
176 | can be used in the | | 176 | can be used in the |
177 | .Ar hour | | 177 | .Ar hour |
178 | field to specify command execution every other hour. | | 178 | field to specify command execution every other hour. |