What is crontab?

Source: Internet
Author: User
  1. Introduction
    Crontab-operate the daemon of each user and the execution schedule.
  2. Some parameter descriptions
    Crontab file [-u user]-replace the current crontab with the specified file.
    Crontab-[-u user]-replace the current crontab with the standard input.
    Crontab-1 [user]-list the current crontab of the user.
    Crontab-E [user]-edit the current crontab of the user.
    Crontab-d [user]-delete the current crontab of the user.
    Crontab-C Dir-specifies the crontab directory.
    Crontab file format: m h d m d cmd.
    M: minute (0-59 ).
    H: hour (0-23 ).
    D: Day (1-31 ).
    M: Month (1-12 ).
    D: days in a week (0 ~ 6, 0 is Sunday ).
    The program to be run by CMD is sent to SH for execution. The shell contains only three environment variables: User, home, and shell.
  3. The following is an example file:
    # Min hour day month dayofweek command
    #06:10 every morning
    10 6 **** date
    # Every two hours
    0 */2 * Date
    # Every two hours from PM to am, am
    0 23-7/2, 8 **** date
    # Am on the 4th day of each month and from Monday to Wednesday of each week
    0 11 4 * Mon-wed date
    # A.m. of July
    0 4 1 Jan * Date
    Example
    $ Crontab-l list the current crontab of a user.
    # Min hour day month dayofweek command
    10 6 **** date
    0 */2 * Date
    0 23-7/2, 8 **** date

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.