Fri Apr 17 19:42:14 2020 UTC ()
Move the range example (for 8-11) to follow the range definition, and to
preceed the random (?) discussion (and the corresponding random example)


(pgoyette)
diff -r1.8 -r1.9 src/external/bsd/cron/dist/crontab.5

cvs diff -r1.8 -r1.9 src/external/bsd/cron/dist/crontab.5 (expand / switch to unified diff)

--- src/external/bsd/cron/dist/crontab.5 2020/04/17 18:39:31 1.8
+++ src/external/bsd/cron/dist/crontab.5 2020/04/17 19:42:14 1.9
@@ -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
134Lists are allowed. 134Lists are allowed.
135A list is a set of numbers (or ranges) separated by commas. 135A list is a set of numbers (or ranges) separated by commas.
136For example, 136For example,
137.Dq 1,2,5,9 137.Dq 1,2,5,9
138or 138or
139.Dq 0\(en4,8\(en12 . 139.Dq 0\(en4,8\(en12 .
140.Pp 140.Pp
141Ranges of numbers are allowed. 141Ranges of numbers are allowed.
142Ranges are two numbers separated with a hyphen. 142Ranges are two numbers separated with a hyphen.
143The specified range is inclusive. 143The specified range is inclusive.
 144For example,
 1458\(en11 for an
 146.Ar hour
 147entry specifies execution at hours 8, 9, 10 and 11.
144.Pp 148.Pp
145A field may begin with a question mark 149A field may begin with a question mark
146.Pq Sq \&? , 150.Pq Sq \&? ,
147which indicates a single value randomly selected when the crontab 151which indicates a single value randomly selected when the crontab
148file is read. 152file is read.
149If the field contains only a question mark, the value is randomly 153If the field contains only a question mark, the value is randomly
150selected from the range of all possible values for the field. 154selected from the range of all possible values for the field.
151If the question mark precedes a range, the value is randomly selected 155If the question mark precedes a range, the value is randomly selected
152from the range. 156from the range.
153For example, 157For example,
154.Dq ? ?2-5 * * * 158.Dq ? ?2-5 * * *
155specifies that a task will be performed daily between 2:00am and 159specifies that a task will be performed daily between 2:00am and
156and 5:59am at a time randomly selected when the crontab file is 160and 5:59am at a time randomly selected when the crontab file is
157first read. 161first read.
158As just one example, this feature can be used to prevent a large 162As just one example, this feature can be used to prevent a large
159number of hosts from contacting a server simultaneously and 163number of hosts from contacting a server simultaneously and
160overloading it by staggering the time at which a download script 164overloading it by staggering the time at which a download script
161is executed. 165is executed.
162For example, 
1638\(en11 for an 
164.Ar hour 
165entry specifies execution at hours 8, 9, 10 and 11. 
166.Pp 166.Pp
167Step values can be used in conjunction with ranges (but not random ranges 167Step values can be used in conjunction with ranges (but not random ranges
168which represent a single number). 168which represent a single number).
169Following a range with 169Following a range with
170.No / Ns Ar number 170.No / Ns Ar number
171specifies skips of 171specifies skips of
172.Ar number 172.Ar number
173through the range. 173through the range.
174For example, 174For example,
175.Dq 0\(en23/2 175.Dq 0\(en23/2
176can be used in the 176can be used in the
177.Ar hour 177.Ar hour
178field to specify command execution every other hour. 178field to specify command execution every other hour.