Scheduled Tasks
at 5pm + 3 days/bin/ls # One-time scheduled task specified three days after 5:00 execution/bin/ lscrontab -e # Edit Cycle Task # minutes Hours Day Month Week command or script 1 , 30 1 - Span style= "COLOR: #800080" >3 /2 * * * command or Script >> file.log 2 >&1 echo Span style= "COLOR: #800000" > " 40 7 * * 2/root/sh " >>/var /spool/cron/l # View automatic recurring task crontab -r # Remove automatic recurring task Cron.deny and Cron.allow # Disable or allow users to use Cycle task service Crond start |stop|restart # Start Automatic recurring service
Date operation parameters;
Date-s20091112# Set Date-S -: -: -# Set time Date-D"7 days ago"+%y%m%D # 7 days ago Dates Date-D"5 minute ago"+%h:%M # 5 minutes ago Time Date-D"1 month ago"+%y%m%d # One months ago Date-D'1 Days'+%y-%m-%D # A day later date-D'1 hours'+%h:%m:%S # an hour later date+%y-%m-%d-d'20110902'# date format Conversions+%y-%m-%d_%X # dates and times date+%N # nanoseconds Date-D"2012-08-13 14:00:23"+%S # converted to seconds (1970-to-date number of seconds) date-D"@1363867952"+%y-%m-%d-%T # Convert timestamps to date dates-D"1970-01-01 UTC 1363867952 seconds"+%y-%m-%d-%T # Convert timestamps to date dates-D"' Awk-f ' {print $} '/proc/uptime ' second ago"+"%y-%m-%d%h:%m:%s"# Format system startup time (seconds ago)
Linux-crontab Scheduled Tasks