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