1. Detailed crontab format
Time-Sharing and Lunar Week
* * * * *
Min 1-59
Hour 1-23 0 means 0 points
Day 1-31
Month 1-12
Week 0-6 0 means Sunday
Data format
1 * * * * The number of the first minute per hour is performed (once per hour)
*/1 * * * * score every Minute
10-30/1 * * * * * * * * * * 10 to 30 minutes per hour
* 23-5 * * * * Range 23 to 5 per day
* 1,3,5 * * * List of 1-point 3-point 5-point execution per day
Every 30 minutes
*/30 * * * * * *
0,30 * * * * * *
2. Crontab Common Commands
Crontab-e Edit timed execution script
Crontab-l View timed execution scripts
Linux:service Crond Restart
/etc/init.d/crond restart
Mac:sudo/usr/sbin/cron restart
3. Crontab execution result saved to specified file
Timed script execution results saved to current date file
* * * echo ' 123 ' >>/tmp/$ (date +%y-%m-%d). log
Timed script saves specified output and error records
0,30 * * * */usr/local/a.sh >>/tmp/log/a.log 2>&1
2>&1 indicates that the error and standard output are also exported to the A.log
2 indicates an error output
1 indicates standard output
>& Specific differences: http://blog.csdn.net/reyleon/article/details/11595985