Crontab-scheduled job

Source: Internet
Author: User

Recently I read some information about crontab and learned about it. It is almost the same as scheduled tasks in windows.

Write your own understanding. If you are wrong, please forgive me ~~~

1. File Location:

Linux:/etc/crontab

AIX:/var/spool/cron/crontabs/

Note: The crontab file in Aix is the same as the user name. If no, no scheduled job for this user is available.

2. crontab Structure

The previous comments are skipped. They mainly talk about how to write and structure scheduled jobs.

AIX: F1 F2 F3 F4 F5 command

F1: The value range of minutes is 0-59.

F2: The Hour value range is 0-23.

F3: Date value range: 1-31

F4: The month value ranges from 1 to 12 or is the first three letters of the month (Case Insensitive)

F5: The value range of the week is 0-7, or the first three letters of the English letter of the day of the week (Case Insensitive). 0, 7 represents Sunday.

Linux: F1 F2 F3 F4 F5 USER command

F1 ~ F5 is the same as that in Aix.

User: the user who runs the command.

3. Parameters

-E: edit the current crontab file or create a new crontab file.

-L list the contents of the crontab file

-R: Delete the crontab file.

The preceding three parameters are common for AIX and Linux. There are many different parameters in Aix and Linux, which can be viewed through man 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.