Linux timer tool-detailed description of crontab parameters and how to view log records

Source: Internet
Author: User
Tags crontab syntax

To use the crontab timer tool, you must start the cron service:

Service cron start

Crontab syntax for future emergency. First, let's look at the awesome figure:




Crontab parameters:

 

-E: Execute the text editor to edit crontab. The defined text editor is VI.

-R: Delete the current crontab.

-L: list the current crontab (dedicated for viewing)

-I: It will be used with-r. When you delete the current crontab, ask, and enter y to delete it.

Note that crontab is user-specific, and the crontab will be edited after logon.

Crontab special symbols:

"*" Indicates all numbers in the value range. Pay special attention to it!

"/" Indicates the meaning of each, for example, "*/5" indicates every 5 units.

"-" Indicates a number to a number.

"," Scattered numbers

Crontab file usage example:

30 21 *** indicates every night

45 4, 22 ** indicates the of every month on the 1st, 10th, and 22nd.

10 1 ** 6, 0 indicates every Saturday and Sunday

0, 30 18-23 *** indicates every 30 minutes between and every day

0 23 ** 6 indicates every Saturday

**/1 *** every hour

* 23-7/1 ** every hour between PM and PM

* 8, 13 ** 1-5 Eight o'clock A.M. and one o'clock P.M. from Monday to Friday

0 11 4 * mon-wed: Every Monday to Wednesday

0 4 1 jan * of January 1, January 1

 

Use crontab in Linux to create scheduled tasks

Routine scheduling of crontab in Linux

Linux crontab does not run troubleshooting

Ubuntu uses crontab for scheduled tasks

Linux scheduled task (at batch crontab anacron)

For more details of this article, please continue to read the highlights of page 2nd:

  • 1
  • 2
  • Next Page

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.