Crontab usage tips 1. View crontab instructions Linux code [fwang5 @ szotautotest03 ~] $ More/etc/crontab SHELL =/bin/bash PATH =/sbin:/bin:/usr/sbin: /usr/bin MAILTO = root HOME =/# For details see man 4 crontabs # Example of job definition :#. ---------------- minute (0-59) # |. ------------- hour (0-23) # |. ---------- day of month (1-31) # |. ------- month (1-12) OR jan, feb, mar, apr... # |. ---- day of week (0-6) (Sunday = 0 or 7) OR sun, mon, tue, wed, thu, fri, sat # | # ***** User-name command to be executed 2. query the crontab service command and the current Linux code [fwang5 @ szotautotest03 ~] $ Sudo/sbin/service crond Usage:/etc/init. d/crond {start | stop | status | restart | condrestart | try-restart | reload | force-reload} [fwang5 @ szotautotest03 ~] $ Sudo/sbin/service crond status crond (pid 20109) is running... 3. view the Linux code for crontab configuration [fwang5 @ szotautotest03 ~] $ Sudo crontab-u fwang5-l 5 8 ***/home/MSDOMAIN1/fwang5/work/weblogin-monitor/loginstart. sh &>/dev/null 0 9 ***/home/MSDOMAIN1/fwang5/work/stash-user-monitor/start. sh &>/dev/null 4. edit crontab configuration (automatically enters VI editing mode) Linux code [fwang5 @ szotautotest03 ~] $ Sudo crontab-u fwang5-e 5 8 ***/home/MSDOMAIN1/fwang5/work/weblogin-monitor/loginstart. sh &>/dev/null 0 9 ***/home/MSDOMAIN1/fwang5/work/stash-user-monitor/start. sh &>/dev/null ~ ~ "/Tmp/crontab. uDsLmb" 2L, 161C 5. Delete crontab to configure Linux code [fwang5 @ szotautotest03 ~] $ Sudo crontab-u fwang5-r 6. view the crontab log Linux code [fwang5 @ szotautotest03 ~] $ Sudo tail-f/var/log/cron Apr 8 14:02:50 szotautotest03 crontab [24296]: (root) LIST (fwang5) Apr 8 14:02:56 szotautotest03 crontab [24298]: (root) begin edit (fwang5) Apr 8 14:03:57 szotautotest03 crontab [24298]: (root) REPLACE (fwang5) Apr 8 14:03:57 szotautotest03 crontab [24298]: (root) end edit (fwang5) apr 8 14:04:01 szotautotest03 crond [20109]: (fwang5) RELOAD (/var/spool/cron/fwang5) Apr 8 14:10:20 szotautotest03 crontab [24314]: (root) LIST (fwang5) apr 8 14:29:15 szotautotest03 crontab [24323]: (root) LIST (fwang5) Apr 8 14:35:53 szotautotest03 crontab [24385]: (root) LIST (fwang5) apr 8 14:36:22 szotautotest03 crontab [24387]: (root) begin edit (fwang5) Apr 8 14:37:49 szotautotest03 crontab [24387]: (root) end edit (fwang5)