.\"/* Copyright 1988,1990,1993,1996 by Paul Vixie .\" * All rights reserved .\" */ .\" .\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc. .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS .\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE .\" CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" .\" $OpenBSD: cron.8,v 1.11 2001/08/02 18:37:34 mpech 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 SIGNALS On receipt of a .Tn SIGHUP , the cron daemon will close and reopen its log file. This is useful in scripts which rotate and age log files. Naturally this is not relevant if cron was built to use .Xr syslog 3 . .Sh SEE ALSO .Xr crontab 1 , .Xr crontab 5 .Sh AUTHORS Paul Vixie