CRONTAB(5) CRONTAB(5) crontab - crontab cron(8) : " ". crontab . crontab crontab. Uucp News crontabs su(1) cron. . (#) . cron . . crontab cron. : name = value (=) value name. value ( ) . cron(8) . SHELL /bin/sh LOGNAME HOME /etc/passwd crontab. HOME SHELL crontab LOGNAME. (: LOGNAME USER BSD ). LOGNAME HOME SHELL cron(8) MAILTO crontab . MAILTO ( ) . MAILTO (MAILTO="") . crontab. /bin/mail /usr/lib/sendmail . /bin/mail UUCP . MAILFROM ( ) . crond. (: MAILFROM MAILTO : MAILFROM=cron-$USER@cron.com ( $USER ) ) cron 'Content-Type:' 'text/plain' 'charset=' 'charmap/codeset' crond(8) LC_* LC_* ( locale(7)). cron CONTENT_TYPE CONTENT_TRANSFER_ENCODING crontab . CRON_TZ cron. . . MLS_LEVEL SELinux crontab. cron SELinux crontab. . SELinux MLS/MCS selinux(8) crontab . MLS_LEVEL SELinux SELinux . crond . crontab(1) -s. RANDOM_DELAY . cron . cron V7 . user ( crontab system) . cron(8) '' '' ' ' '' (' ' ' ') ( "" ). " " " ". ( ) . cron(8) cron . : ----- -------------- minute 0-59 hour 0-23 day of month 1-31 month 1-12 (or names, see below) 0-7 (0 7 ) (*) "-". . . . 8-11 '' 8 9 10 11. . . . . 6~15 '' 6 15. crontab. . . ~ '' 0 59. . ( ) . : "1,2,5,9", "0-4,8-12". . "/" . "0-23/2" '' ( V7 "0,2,4,6,8,10,12, 14,16,18,20,22"). "*/2". . "*/23" 0 23 . "" . '' ' '. ( ). . : "mon,wed,fri", "jan-mar". UID 0 () crontab "-". cron syslog . '' ( ) . "%" /bin/sh SHELL cron. "%" (\) % . : -- ' ' ' '. ( "*") . "30 4 1,15 * 5" 4:30 1 15 . crontab -T. crontab(1) . CRON # use /bin/sh to run commands, no matter what /etc/passwd says SHELL=/bin/sh # mail any output to `paul', no matter whose crontab this is MAILTO=paul # CRON_TZ=Japan # run five minutes after midnight, every day 5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1 # run at 2:15pm on the first of every month -- output mailed to paul 15 14 1 * * $HOME/bin/monthly # run at 10 pm on weekdays, annoy Joe 0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?% 23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" 5 4 * * sun echo "run at 5 after 4 every sunday" /etc/cron.d/ cron.d /etc/crontab . MAILTO . /etc/cron.d/job #login as root #create job with preferred editor (e.g. vim) MAILTO=root * * * * * root touch /tmp/file . "0/35" crontab 35 0 35 . : * * * * * if [ $(expr \( $(date +%s) / 60 \) % 58) = 0 ]; then echo this runs every 58 minutes; fi 0 * * * * if [ $(expr \( $(date +%s) / 3600 \) % 23) = 0 ]; then echo this runs every 23 hours on the hour; fi date(1) "+%s" UNIX. SELinux (MLS) crontab crontab -s crontab. /etc/selinux/targeted/seusers. crontab MLS : - / - /. SELINUX MLS # login as root newrole -r sysadm_r mkdir /tmp/SystemHigh chcon -l SystemHigh /tmp/SystemHigh crontab -e # write in crontab file MLS_LEVEL=SystemHigh 0-59 * * * * id -Z > /tmp/SystemHigh/crontest /etc/crontab crontab . /var/spool/cron/ crontabs . /etc/cron.d/ crontabs . cron(8), crontab(1) '@' : @reboot : . @yearly : : "0 0 1 1 *". @annually : : "0 0 1 1 *". @monthly : : "0 0 1 * *". @weekly : "0 0 * * 0". @daily : "0 0 * * *". @hourly : "0 * * * *". crontab . -p crond. inotify crontabs cron . cron SIGHUP crontabs. inotify. cron crontab . crontab ( EOF) cron crontab ( ). syslog. Paul Vixie 3 . . : . cronie 22 2012 CRONTAB(5)