source: trunk/minix/man/man8/cron.8@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 4.6 KB
Line 
1.TH CRON 8
2.SH NAME
3cron \- clock daemon
4.SH SYNOPSIS
5.B cron
6.RB [ \-d\c
7.RI [ level ]]
8.SH DESCRIPTION
9The
10.B cron
11daemon executes tasks that must be repeated every now and then (cron jobs),
12and tasks that must be run just once (at jobs). It is normally used to run
13daily or weekly system maintenance scripts. What it needs to run and when
14is specified in a number of "cron tables", or crontab files for short.
15These tables are:
16.PP
17.RS
18.nf
19.ft B
20/usr/lib/crontab
21/usr/local/lib/crontab
22/var/lib/crontab
23/var/opt/\fIname\fP/lib/crontab\ \ \fR(Minix-vmd only)\fB
24/usr/spool/crontabs/\fIuser\fP
25.ft R
26.fi
27.RE
28.PP
29These files follow the usual pattern: One for the standard things, one for
30local tasks per organization, one for tasks per system, and one crontab per
31installed package. (Cron reads
32.B /usr/lib/packages
33to find names of installed packages, it doesn't just grab everything in
34.BR /var/opt .)
35The last set of files fall outside the normal pattern, they are per user
36crontabs that one can create with the
37.BR crontab (1)
38command. The file names in
39.B /usr/spool/crontabs/
40are login names of the file owners.
41.PP
42The format of a crontab file is described in
43.BR crontab (5).
44.SS "AT jobs"
45.B Cron
46also takes care of the execution of jobs issued by
47.BR at (1)
48that are found in
49.BR /usr/spool/at/ .
50Cron simply runs the AT job as if there were an "sh at-job" as a cron job at
51the appropriate time under the user-id of the owner of the script. The
52script takes care of the rest. See
53.BR at (1)
54for the details.
55.SS "Job I/O"
56Standard input, output and error are the same as cron's if the job is
57started by the system crontabs or from package crontabs. This means that
58output from system jobs usually ends up on the console and in the log file.
59Output from personal cron jobs or at jobs are mailed to the owner of the
60job. No mail is sent if the job is silent.
61.SH OPTIONS
62.TP 5
63[\fB\-d\fR[\fIlevel\fR]]
64Set the debug level, by default 1. Makes
65.B cron
66print info on what it happens to be doing. Level 1 just tells about sleep
67times and what job is executed, level 2 also shows the internal crontab
68data on a table load. (With time fields translated to match those of
69.BR "struct tm" ,
70see
71.BR ctime (3).)
72.SS SIGNALS
73.B Cron
74takes the following actions when sent one of the following signals:
75.TP 12
76.B SIGHUP
77Reload the crontab tables if they changed since the last time they were
78loaded, and reexamine the AT job spool. Used by
79.BR at (1)
80and
81.BR crontab (1).
82.TP
83.B SIGUSR1
84Increase the debug level by 1.
85.TP
86.B SIGUSR2
87Turn debugging off.
88.SH ENVIRONMENT
89.B Cron
90sets the environment variables
91.BR USER ,
92.BR LOGNAME ,
93.BR HOME ,
94and
95.BR SHELL
96to the user's login name (2x), home directory, and shell if a job is
97executed for a given user. The working directory is set to the user's home
98directory. Everything else is inherited from
99.BR cron ,
100exactly as
101.B cron
102got it when it started. Note that commands are always passed to
103.BR /bin/sh ,
104not to the user's shell.
105.PP
106System cron jobs are in principle executed with
107.BR cron 's
108environment, use
109.B "\-u root"
110or the crontab file
111.B /usr/spool/crontabs/root
112if you want to give root the same treatment as ordinary users.
113.SH FILES
114.TP 25n
115.B /usr/lib/crontab
116Main MINIX 3 crontab file.
117.TP
118.B /usr/local/lib/crontab
119Local jobs for all systems in an organization.
120.TP
121.B /var/lib/crontab
122System specific jobs.
123.TP
124.B /var/opt/\fIname\fP/lib/crontab
125Per package jobs for Minix-vmd.
126.TP
127.B /usr/lib/packages
128List of installed packages.
129.TP
130.B /usr/spool/crontabs/\fIuser\fP
131Per user jobs.
132.TP
133.B /usr/spool/at/*
134Jobs issued by
135.BR at (1).
136.TP
137.B /usr/run/cron.pid
138Process id of cron when cron is running. Used by
139.BR at (1)
140and
141.BR crontab (1)
142to send cron a hangup signal.
143.SH "SEE ALSO"
144.BR at (1),
145.BR crontab (1).
146.SH NOTES
147A job is not reissued until a previous instance of it has exited. The next
148time to execute is computed from the previous time it ran. If job issuing
149lags behind on the system time then the next time to run it is computed from
150the current system time.
151.SH BUGS
152.B Cron
153doesn't like it if the system time is changed. If set forward then cron
154will react when it next wakes up by running all jobs within the skipped time
155once or twice before it catches up. Setting the clock backwards makes cron
156play dead until the system time passes the old time. (Changing the system
157time is bad idea anyway, and not just because of cron.)
158.PP
159Jobs that fall in the missing hour in a change to Daylight Saving Time are
160skipped. Nothing is done in the extra hour on the change out of DST.
161.SH AUTHOR
162Kees J. Bot (kjb@cs.vu.nl)
163
164.\"
165.\" $PchId: cron.8,v 1.3 2000/07/17 18:49:18 philip Exp $
Note: See TracBrowser for help on using the repository browser.