Linux joins a scheduled task

Source: Internet
Author: User
Cron is a scheduled execution tool in linux that runs jobs without manual intervention. Since Cron is a built-in service in Linux, but it does not automatically get up, you can use the following methods to start and close this service:/sbin/servicecrondstart /...
Cron is a scheduled execution tool in linux that runs jobs without manual intervention. Since Cron is a built-in service in Linux, but it does not automatically get up, you can use the following methods to start and close this service: /sbin/service crond start // start the service/sbin/service crond stop // close the service/sbin/service crond restart // restart the service/sbin/service crond reload // reload you can also enable the service automatically when the system starts, in/etc/rc. d/rc. add/sbin/service crond start www.2cto.com at the end of the local script. now the Cron service is already in the process and we can use it. The cron service provides the crontab command to set the cron service. The following are some parameters and descriptions of this command: crontab-u // sets the cron service of a user, generally, when executing this command, the root user needs this parameter crontab-l // to list the details of a user's cron service. crontab-r // delete the cron service crontab-e of no user. // edit a user's cron service www.2cto.com. for example, view the cron settings of the root user: crontab-u root-l again, for example, root wants to delete the cron setting of fred: crontab-u fred-r when editing the cron service, the edited content has some formats and conventions. input: crontab-u root-e enters the vi editing mode. the edited content must conform to the following format: */60 * top-B-n1 | head-10>/usr/moniterlog 2> & 1 (append top10 to files every hour)

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.