Some common command crontab
service crond start // Start Service
service crond stop // shut down service
service crond restart // restart the service
service crond reload // reload the configuration
chmod + x dbackup.sh backup script to change permissions
crontab -e to open the Scheduled Tasks file
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
/1 * * * /usr/local/qcloud/stargate/admin/start.sh > /dev/null 2>&1 &
/20 * * * /usr/sbin/ntpdate ntpupdate.tencentyun.com >/dev/null &
---- bakup.sh task to be performed
---- * / 5 * * * * performed once every 5 minutes
- /5 * * * * /home/bak/bakup.sh
-
- /1 * * * /home/bak/bakup60.sh
0 1 * * * /home/bak/bakup30day.sh
- /1 * * * /home/bak/bakup60.sh
-
- /2 * * * /home/bak/bakupall.sh
// view the situation crontab task execution
tail -f /var/log/syslog
5 * * * * ls // The first five minutes of every hour to perform a specified command ls
30 5 * * * ls // specified daily 5:30 ls command
30 7 8 * * ls // specify the number of each month at 7:30 8 ls command
30 5 8 6 * ls // designated each year at 5:30 on June 8 ls command
30 6 * * 0 ls // specify every Sunday at 6:30 of the ls command [Note: 0 for Sunday, 1 for 1 week, and so on, can be expressed in English, sun for Sunday, mon for Monday, etc. . ]
30 3 10,20 * * ls 3:30 ls // performed monthly No. 20 and No. 10 a command [Note: "," used to connect a plurality of discontinuous period]
25 8-11 * * * ls // 25 minutes per day point execution command ls 8-11 [Note: "-" is used to connect a continuous time]
/ 15 * * * ls // performed once every 15 minutes ls command [i.e., each hour of 015,304,560 minutes ls command]
6 30 /10 * ls // each month, 10 days 6:30 perform a ls command [ie, 1 month, 11, 21, 31, is the ls command executed once every 6:30. ]
50 7 * * * root run-parts /etc/cron.daily // daily 7:50 /etc/cron.daily execute all executable files in the directory as root [Note: run-parts argument said that after execution