.\"/* Copyright 1988,1990,1993 by Paul Vixie .\" * All rights reserved .\" * .\" * Distribute freely, except: don't remove my name from the source or .\" * documentation (don't take credit for my work), mark your changes (don't .\" * get me blamed for your possible bugs), don't alter or remove this .\" * notice. May be sold if buildable source is provided to buyer. No .\" * warrantee of any kind, express or implied, is included with this .\" * software; use at your own risk, responsibility for damages (if any) to .\" * anyone resulting from the use of this software rests entirely with the .\" * user. .\" * .\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and .\" * I'll try to keep a version up to date. I can be reached as follows: .\" * Paul Vixie uunet!decwrl!vixie!paul .\" */ .\" .\" $Id: cron.8,v 1.8 2000/03/19 17:57:03 aaron Exp $ .\" .Dd June 6, 1999 .Dt CRON 8 .Os .Sh NAME .Nm cron .Nd daemon to execute scheduled commands (Vixie Cron) .Sh SYNOPSIS .Nm cron .Sh DESCRIPTION .Nm should be started from .Pa /etc/rc or .Pa /etc/rc.local . It will return immediately, so you don't need to start it with .Ql \&& . .Pp .Nm searches its spool directory .Pf ( Pa /var/cron/tabs Ns ) for .Xr crontab 5 files which are named after accounts in .Pa /etc/passwd ; crontabs found are loaded into memory. .Nm also searches for .Pa /etc/crontab which is in a different format (see .Xr crontab 5 ) . .Nm then wakes up every minute, examining all loaded crontabs, checking each command to see if it should be run in the current minute. When executing commands, any output is mailed to the user named in the .Ev MAILTO environment variable in the crontab, or to the owner of the crontab if .Ev MAILTO is not present. .Pp Additionally, .Nm checks each minute to see if its spool directory's modtime (or the modtime on .Pa /etc/crontab ) has changed, and if it has, .Nm examines the modtime on all crontabs and reloads those which have changed. Thus .Nm need not be restarted whenever a crontab file is modified. Note that the .Xr crontab 1 command updates the modtime of the spool directory whenever it changes a crontab. .Pp Special considerations exist when the clock is changed by less than 3 hours; for example, at the beginning and end of Daylight Saving Time. If the time has moved forward, those jobs which would have run in the time that was skipped will be run soon after the change. Conversely, if the time has moved backward by less than 3 hours, those jobs that fall into the repeated time will not be run. .Pp Only jobs that run at a particular time (not specified as @hourly, nor with .Ql * in the hour or minute specifier) are affected. Jobs which are specified with wildcards are run based on the new time immediately. .Pp Clock changes of more than 3 hours are considered to be corrections to the clock, and the new time is used immediately. .Sh SEE ALSO .Xr crontab 1 , .Xr crontab 5 .Sh AUTHOR Paul Vixie