Regular Centos task execution

Source: Internet
Author: User

Scheduled task execution: 1. Use of the at command:
At/batch once
At [options] TIME
At>
At>
At>
Ctrl + d
At-l = atq view job content
At-dN = atrm cancel the task before the task expires
At-ffilename reads the specified filename
The execution result is sent to the user by email.

Same as


Crond is executed periodically
Servicecrondstatus
User use:
Crontab
-E Edit
-R Delete
-L display the task list
-UUSERNAME (defined by the Administrator)
System usage:
Edit in/etc/crontab

System cron:
/Etc/crontab
User cron:
/Var/spool/cron/USERNAME (with the same name as the user)
MinhourdaymonthweedCOMMADN
Min: 0-59
Hour: 0-23
Day: 1-31
Month: 1-12
Week: 0-7
*/5 every 5 hours, minutes ,... Run Once
, Discrete time
-Specified range
Its PATH
/Bin:/sbin:/user/bin:/user/sbin only execute commands in these directories
Therefore, it is recommended to write the absolute PATH of the command (use whichCOMMADN to view the absolute PATH of the command) or re-specify the PATH variable.
Crond does not need to be expired, but anacron is added. This command is not used to replace crond. By default
The anacron service is disabled.
/Etc/anacron
The minimum unit of anacron is day.

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.