Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/cron/dist Put back the ? syntax accidentally re...



details:   https://anonhg.NetBSD.org/src/rev/1bc496c5c7c4
branches:  trunk
changeset: 930932:1bc496c5c7c4
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Apr 17 18:39:31 2020 +0000

description:
Put back the ? syntax accidentally removed when syncing with the OpenBSD
man page.

diffstat:

 external/bsd/cron/dist/crontab.5 |  25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diffs (51 lines):

diff -r 731e4b372f27 -r 1bc496c5c7c4 external/bsd/cron/dist/crontab.5
--- a/external/bsd/cron/dist/crontab.5  Fri Apr 17 17:43:38 2020 +0000
+++ b/external/bsd/cron/dist/crontab.5  Fri Apr 17 18:39:31 2020 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: crontab.5,v 1.7 2018/06/15 23:15:56 wiz Exp $
+.\" $NetBSD: crontab.5,v 1.8 2020/04/17 18:39:31 christos Exp $
 .\"
 .\"/* Copyright 1988,1990,1993,1994 by Paul Vixie
 .\" * All rights reserved
@@ -21,7 +21,7 @@
 .\"
 .\" $OpenBSD: crontab.5,v 1.36 2018/06/13 13:27:37 jmc Exp $
 .\"
-.Dd June 14, 2018
+.Dd April 17, 2020
 .Dt CRONTAB 5
 .Os
 .Sh NAME
@@ -141,12 +141,31 @@
 Ranges of numbers are allowed.
 Ranges are two numbers separated with a hyphen.
 The specified range is inclusive.
+.Pp
+A field may begin with a question mark
+.Pq Sq \&? ,
+which indicates a single value randomly selected when the crontab
+file is read.
+If the field contains only a question mark, the value is randomly
+selected from the range of all possible values for the field.
+If the question mark precedes a range, the value is randomly selected
+from the range.
+For example,
+.Dq ? ?2-5 * * *
+specifies that a task will be performed daily between 2:00am and
+and 5:59am at a time randomly selected when the crontab file is
+first read.
+As just one example, this feature can be used to prevent a large
+number of hosts from contacting a server simultaneously and
+overloading it by staggering the time at which a download script
+is executed.
 For example,
 8\(en11 for an
 .Ar hour
 entry specifies execution at hours 8, 9, 10 and 11.
 .Pp
-Step values can be used in conjunction with ranges.
+Step values can be used in conjunction with ranges (but not random ranges
+which represent a single number).
 Following a range with
 .No / Ns Ar number
 specifies skips of



Home | Main Index | Thread Index | Old Index