summaryrefslogtreecommitdiff
path: root/usr.sbin/cron/crontab.5
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2020-04-16 17:51:57 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2020-04-16 17:51:57 +0000
commit8423dd6ccd990d66462b98fb58fae83fb5c67554 (patch)
treea33a9d33a7aca75a470a6e2b3e10266ba37c20c2 /usr.sbin/cron/crontab.5
parenta6506a84d2f65c8f086e792b81d97943bc0644ae (diff)
Add a mechanism to prevent cron jobs from running concurrently.
This adds a new "-s" flag to the command field which indicates that only a single instance of the job should run concurrenty. OK beck@ job@ deraadt@
Diffstat (limited to 'usr.sbin/cron/crontab.5')
-rw-r--r--usr.sbin/cron/crontab.511
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/cron/crontab.5 b/usr.sbin/cron/crontab.5
index ef9ac0a6672..756d0656872 100644
--- a/usr.sbin/cron/crontab.5
+++ b/usr.sbin/cron/crontab.5
@@ -17,9 +17,9 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $OpenBSD: crontab.5,v 1.38 2020/04/15 01:59:34 millert Exp $
+.\" $OpenBSD: crontab.5,v 1.39 2020/04/16 17:51:56 millert Exp $
.\"
-.Dd $Mdocdate: April 15 2020 $
+.Dd $Mdocdate: April 16 2020 $
.Dt CRONTAB 5
.Os
.Sh NAME
@@ -217,6 +217,13 @@ option is an attempt to cure potentially copious volumes of mail coming from
.Xr cron 8 .
.It Fl q Ar command
Execution will not be logged.
+.It Fl s Ar command
+Only a single instance of
+.Ar command
+will be run concurrently.
+Additional instances of
+.Ar command
+will not be scheduled until the earlier one completes.
.El
.Pp
Commands are executed by