Use crontab in Linux to create scheduled tasks

Source: Internet
Author: User

In Linux, use crontab to create scheduled tasks. In linux, start the crontab service:/etc/init. the Command Format of d/crond startcrontab: crontab-l displays the current crontab file (the crontab file written by default is saved in (/var/spool/cron/User Name For example: /var/spool/cron/roger) crontab-r deletes the current crontab (use this method with caution because all scheduled tasks will be deleted) crontab-e use the editor to edit the file format of the current crontab file crontab: minutes hour day-of-month-of-year day-of-week commands for example: 0 4 ** 2, 5/usr/bin/wall </etc/motd *************** explanation: information in the/etc/motd broadcast on Tuesday and Friday is **************************** * ******************/2 12-14*3-6, 9-12 1-5 bash_scripts **** * ************** explanation: run the *** crontab configuration file every two minutes from Monday to Friday in the 3-6 months of each year, and from Monday to Friday in the 9-12 months in the/etc/crontab.

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.