Centos8 Scheduled Task Plan crontab

Crontab task plans are used to execute programs periodically.
1) View crontab services

systemctl status crond

2) Task plan format

*(minute) * (hour) * (day) * (month) * (week) cycle execution procedure
#The longest is every year, the shortest is every minute

30 22 * * 6  time.sh
#Every Saturday at 22:30 PM time.sh script

30 22 * * 1,3,5  time.sh
#Every Monday, Wednesday and Friday at 22:30 PM time.sh script

30 22 * * 1-5  time.sh
#Every week from Monday to Friday at 22:30 PM time.sh script

* * * * *  time.sh
#Every minute time.sh script

*/5 * * * *  time.sh
#Every 5 minutes time.sh script

00 00 * * *  time.sh
#Every night at 0:00 p.m time.sh script

3) View cron task plan

crontab -l

4) Edit cron task plan

crontab -e

5) Delete all cron task schedules

crontab -r

Author:https://blog.csdn.net/richardfjf/article/details/106786772

Comments

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注