Command:
Crontab-l View the currently running scheduled tasks
CRONTAB-E Edit current Run scheduled task modify or add
Press the I key to enter the edit text state, ESC ends the edit state: Wq save exit.
To configure the execution period:
* * * * * command
Time-sharing Weekly command
The 1th column represents minutes 1~59 per minute with * or */1
The 2nd column represents the hour 1~23 (0 means 0 points) //Example: * 6 * * * command means 6 points per day; * */6 * * * command means every 6 hours;
The 3rd column represents the date 1~31
The 4th column represents the month 1~12
5th Column Identification Number Week 0~6 (0 = Sunday)
6th List of commands to run
Some examples of crontab files:
* * * * */usr/local/etc/rc.d/lighttpd restart
The above example shows a 21:30 restart lighttpd per night.
4 1,10,22 * */USR/LOCAL/ETC/RC.D/LIGHTTPD restart
The above example shows a 4:45 restart lighttpd per month for 1, 10, 22nd.
1 * * 6,0/USR/LOCAL/ETC/RC.D/LIGHTTPD restart
The above example shows a 1:10 restart lighttpd per Saturday and Sunday.
0,30 18-23 * * */usr/local/etc/rc.d/lighttpd restart
The example above shows that LIGHTTPD restarts every 30 minutes from 18:00 to 23:00 every day.
0 * * 6/USR/LOCAL/ETC/RC.D/LIGHTTPD restart
The above example shows the restart of lighttpd per Saturday.
Linux crontab Scheduled Task settings (simple knot)