Linux-crontab timed Task Instructions

Source: Internet
Author: User

Crontab is a Linux timed task instruction that can be used to automate the execution of shell scripts, or to execute instructions on a timed basis.

$ crontab-e

Add a task plan to the edit interface as follows

*/5 * * * */usr/sbin/ntpdate hadoop-manager|logger-t NTP

Exit and save the file, you can complete the scheduled task, on the command to complete the scheduled NTP synchronization task.

View cron log files to verify task execution

$ sudo tail-f/var/log/cron

In complex tasks, the shell can be used to write the process, so that crontab as a simple scheduling engine work


The appeal order * stands for: minutes, hours, days, months, weeks

1,30 24-3 * * * indicates daily from 24 o'clock to 3 points: 1 points or 30 minutes execution instruction

1-30/5 * * * * indicates every 1 to 30 minutes per day to execute instructions at 5-minute intervals

Rules and so on

This article is from the "Gointosunset" blog, make sure to keep this source http://gointosunset.blog.51cto.com/5354475/1576284

Linux-crontab timed Task Instructions

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.