cron.8
来自「minix操作系统最新版本(3.1.1)的源代码」· 8 代码 · 共 166 行
8
166 行
.TH CRON 8.SH NAMEcron \- clock daemon.SH SYNOPSIS.B cron.RB [ \-d\c.RI [ level ]].SH DESCRIPTIONThe.B crondaemon executes tasks that must be repeated every now and then (cron jobs),and tasks that must be run just once (at jobs). It is normally used to rundaily or weekly system maintenance scripts. What it needs to run and whenis specified in a number of "cron tables", or crontab files for short.These tables are:.PP.RS.nf.ft B/usr/lib/crontab/usr/local/lib/crontab/var/lib/crontab/var/opt/\fIname\fP/lib/crontab\ \ \fR(Minix-vmd only)\fB/usr/spool/crontabs/\fIuser\fP.ft R.fi.RE.PPThese files follow the usual pattern: One for the standard things, one forlocal tasks per organization, one for tasks per system, and one crontab perinstalled package. (Cron reads.B /usr/lib/packagesto find names of installed packages, it doesn't just grab everything in.BR /var/opt .)The last set of files fall outside the normal pattern, they are per usercrontabs that one can create with the.BR crontab (1)command. The file names in.B /usr/spool/crontabs/are login names of the file owners..PPThe format of a crontab file is described in.BR crontab (5)..SS "AT jobs".B Cronalso takes care of the execution of jobs issued by.BR at (1)that are found in.BR /usr/spool/at/ .Cron simply runs the AT job as if there were an "sh at-job" as a cron job atthe appropriate time under the user-id of the owner of the script. Thescript takes care of the rest. See.BR at (1)for the details..SS "Job I/O"Standard input, output and error are the same as cron's if the job isstarted by the system crontabs or from package crontabs. This means thatoutput from system jobs usually ends up on the console and in the log file.Output from personal cron jobs or at jobs are mailed to the owner of thejob. No mail is sent if the job is silent..SH OPTIONS.TP 5[\fB\-d\fR[\fIlevel\fR]]Set the debug level, by default 1. Makes.B cronprint info on what it happens to be doing. Level 1 just tells about sleeptimes and what job is executed, level 2 also shows the internal crontabdata on a table load. (With time fields translated to match those of.BR "struct tm" ,see.BR ctime (3).).SS SIGNALS.B Crontakes the following actions when sent one of the following signals:.TP 12.B SIGHUPReload the crontab tables if they changed since the last time they wereloaded, and reexamine the AT job spool. Used by.BR at (1)and.BR crontab (1)..TP.B SIGUSR1Increase the debug level by 1..TP.B SIGUSR2Turn debugging off..SH ENVIRONMENT.B Cronsets the environment variables.BR USER ,.BR LOGNAME ,.BR HOME ,and.BR SHELLto the user's login name (2x), home directory, and shell if a job isexecuted for a given user. The working directory is set to the user's homedirectory. Everything else is inherited from.BR cron ,exactly as.B crongot it when it started. Note that commands are always passed to.BR /bin/sh ,not to the user's shell..PPSystem cron jobs are in principle executed with.BR cron 'senvironment, use.B "\-u root"or the crontab file.B /usr/spool/crontabs/rootif you want to give root the same treatment as ordinary users..SH FILES.TP 25n.B /usr/lib/crontabMain MINIX 3 crontab file..TP.B /usr/local/lib/crontabLocal jobs for all systems in an organization..TP.B /var/lib/crontabSystem specific jobs..TP.B /var/opt/\fIname\fP/lib/crontabPer package jobs for Minix-vmd..TP.B /usr/lib/packagesList of installed packages..TP.B /usr/spool/crontabs/\fIuser\fPPer user jobs..TP.B /usr/spool/at/*Jobs issued by.BR at (1)..TP.B /usr/run/cron.pidProcess id of cron when cron is running. Used by.BR at (1)and.BR crontab (1)to send cron a hangup signal..SH "SEE ALSO".BR at (1),.BR crontab (1)..SH NOTESA job is not reissued until a previous instance of it has exited. The nexttime to execute is computed from the previous time it ran. If job issuinglags behind on the system time then the next time to run it is computed fromthe current system time..SH BUGS.B Crondoesn't like it if the system time is changed. If set forward then cronwill react when it next wakes up by running all jobs within the skipped timeonce or twice before it catches up. Setting the clock backwards makes cronplay dead until the system time passes the old time. (Changing the systemtime is bad idea anyway, and not just because of cron.).PPJobs that fall in the missing hour in a change to Daylight Saving Time areskipped. Nothing is done in the extra hour on the change out of DST..SH AUTHORKees J. Bot (kjb@cs.vu.nl).\".\" $PchId: cron.8,v 1.3 2000/07/17 18:49:18 philip Exp $
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?