Linux-crontab Scheduled Tasks

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.