1.\"/* Copyright 1988,1990,1993 by Paul Vixie 2.\" * All rights reserved 3.\" * 4.\" * Distribute freely, except: don't remove my name from the source or 5.\" * documentation (don't take credit for my work), mark your changes (don't 6.\" * get me blamed for your possible bugs), don't alter or remove this 7.\" * notice. May be sold if buildable source is provided to buyer. No 8.\" * warrantee of any kind, express or implied, is included with this 9.\" * software; use at your own risk, responsibility for damages (if any) to 10.\" * anyone resulting from the use of this software rests entirely with the 11.\" * user. 12.\" * 13.\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and 14.\" * I'll try to keep a version up to date. I can be reached as follows: 15.\" * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul 16.\" */ 17.\" 18.\" $FreeBSD: src/usr.sbin/cron/cron/cron.8,v 1.7.2.9 2003/03/11 21:13:48 trhodes Exp $ 19.\" $DragonFly: src/usr.sbin/cron/cron/cron.8,v 1.2 2003/06/17 04:29:53 dillon Exp $ 20.\" 21.Dd December 20, 1993 22.Dt CRON 8 23.Os 24.Sh NAME 25.Nm cron 26.Nd daemon to execute scheduled commands (Vixie Cron) 27.Sh SYNOPSIS 28.Nm 29.Op Fl s 30.Op Fl o 31.Op Fl x Ar debugflag Ns Op , Ns Ar ... 32.Sh DESCRIPTION 33The 34.Nm 35utility should be started from 36.Pa /etc/rc 37or 38.Pa /etc/rc.local . 39It will return immediately, 40so you don't need to start it with '&'. 41.Pp 42The 43.Nm 44utility searches 45.Pa /var/cron/tabs 46for crontab files which are named after accounts in 47.Pa /etc/passwd ; 48crontabs found are loaded into memory. 49The 50.Nm 51utility also searches for 52.Pa /etc/crontab 53which is in a different format (see 54.Xr crontab 5 ) . 55The 56.Nm 57utility 58then wakes up every minute, examining all stored crontabs, checking each 59command to see if it should be run in the current minute. When executing 60commands, any output is mailed to the owner of the crontab (or to the user 61named in the 62.Ev MAILTO 63environment variable in the crontab, if such exists). 64.Pp 65Additionally, 66.Nm 67checks each minute to see if its spool directory's modification time (or 68the modification time on 69.Pa /etc/crontab ) 70has changed, and if it has, 71.Nm 72will then examine the modification time on all crontabs and reload those 73which have changed. Thus 74.Nm 75need not be restarted whenever a crontab file is modified. Note that the 76.Xr crontab 1 77command updates the modification time of the spool directory whenever it 78changes a crontab. 79.Pp 80Available options: 81.Bl -tag -width indent 82.It Fl s 83Enable special handling of situations when the GMT offset of the local 84timezone changes, such as the switches between the standard time and 85daylight saving time. 86.Pp 87The jobs run during the GMT offset changes time as 88intuitively expected. 89If a job falls into a time interval that disappears 90(for example, during the switch from 91standard time) to daylight saving time or is 92duplicated (for example, during the reverse switch), then it's handled 93in one of two ways: 94.Pp 95The first case is for the jobs that run every at hour of a time interval 96overlapping with the disappearing or duplicated interval. 97In other words, if the job had run within one hour before the GMT offset change 98(and cron was not restarted nor the 99.Xr crontab 5 100changed after that) 101or would run after the change at the next hour. 102They work as always, skip the skipped time or run in the added 103time as usual. 104.Pp 105The second case is for the jobs that run less frequently. 106They are executed exactly once, they are not skipped nor 107executed twice (unless cron is restarted or the user's 108.Xr crontab 5 109is changed during such a time interval). 110If an interval disappears 111due to the GMT offset change, such jobs are 112executed at the same absolute point of time as they would be in the 113old time zone. 114For example, if exactly one hour disappears, this 115point would be during the next hour at the first minute that is 116specified for them in 117.Xr crontab 5 . 118.It Fl o 119Disable the special handling of situations when the GMT offset of the local 120timezone changes, to be compatible with the old (default) behavior. 121If both options 122.Fl o 123and 124.Fl s 125are specified, the option specified last wins. 126.It Fl x Ar debugflag Ns Op , Ns Ar ... 127Enable writing of debugging information to standard output. 128One or more of the following comma separated 129.Ar debugflag 130identifiers must be specified: 131.Pp 132.Bl -tag -width ".Cm proc" -compact 133.It Cm bit 134currently not used 135.It Cm ext 136make the other debug flags more verbose 137.It Cm load 138be verbose when loading crontab files 139.It Cm misc 140be verbose about miscellaneous one-off events 141.It Cm pars 142be verbose about parsing individual crontab lines 143.It Cm proc 144be verbose about the state of the process, including all of its offspring 145.It Cm sch 146be verbose when iterating through the scheduling algorithms 147.It Cm test 148trace through the execution, but do not perform any actions 149.El 150.El 151.Sh SEE ALSO 152.Xr crontab 1 , 153.Xr crontab 5 154.Sh AUTHORS 155.An Paul Vixie Aq paul@vix.com 156