Linux Plan crontab

Source: Internet
Author: User

Linux Plan crontab

Start the crontab service

General start service with/sbin/service Crond start

If the root user's cron service can be crond start with sudo services

See if the service is already running with Ps-ax | grep cron

See if the Crontab service under this user was created successfully with Crontab-l

Lists a user's cron service crontab-l//-l lists a user's scheduled tasks

Delete a user's cron service crontab-r//-r Delete a user's task

Edit a user's cron service crontab-e//-e Edit a user's tasks

Specify a user's cron service crontab-u//-u Specify a user

Where to store the crontab files

/etc/crontab

Cron files for users under/var/spool/cron/

Cron file Syntax:

"*" represents a number in the range of values, "/" stands for "each", "-" represents a number from one digit to a number, "," separates several discrete numbers,

For fields that are not specified, use "*" to fill their position

Hour of the week order

0-59 0-23 1-31 1-12 0-6 Command (value range, 0 for Sunday One a row corresponds to a task)

3 3 3 3 * ls (execute ls command every March 3 3:03)

3 3 3,13 3-8 * ls (the LS command is executed every March-August 3rd and 13th 3:03)

*/3 3 3,13 3-8 * ls (the LS command is executed every 3 minutes on 3rd and 13th of March-August of each year 3 o'clock)

    • This article is from: Linux Learning Network

Linux Plan 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.