Linux

Centos8 Scheduled Task Plan crontab

2021年4月16日

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

You Might Also Like

No Comments

Leave a Reply

%d 博主赞过: