Crontab Scheduled Tasks

Source: Internet
Author: User

# View Crontab Service status

Service Crond Status


# Open crontab Service

/etc/init.d/crond start


# config file for crontab

/etc/crontab


SHELL=/bin/bash
Specifies which shell the system will use

PATH=/sbin:/bin:/usr/ sbin: / usr / bin
Specifies the path of the System execution command

MAILTO=root
Specifies that the task execution information for Crond will be sent to the root user by mail

HOME=/
Specify the home directory to use when executing a command or script





/etc/Cron.Deny represents a user who cannot use the crontab command

/etc/Cron.allowrepresents a user who can use crontab

The Cron.allow file does not exist by default
If two files exist at the same time, then/etc/Cron.allow Priority
If none of the two files exist then only root can be used

Cron.DenyThe file is empty by default


/var/Spool/Cron/A directory of all user crontab information, named after the user name








# executes every 2 minutes
*/2*** *


# Executes once every 1 hours
0****

* once daily 2 o'clock in the morning 30
* * *

Crontab Scheduled Tasks

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.