Linux crontab 设置定时任务

crontab

crontab 用于设置系统自动执行的周期性任务

# m h dom mon dow user  command
17  *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25  6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47  6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52  6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

解释:
m:minute
h:hour
dom:day of month
mon:month
dow:day of week

本博客为Swagger-Ranger的笔记分享,文中源码地址: https://github.com/Swagger-Ranger
欢迎交流指正,如有侵权请联系作者确认删除: liufei32@outlook.com

原文地址:https://www.cnblogs.com/Swagger-Ranger/p/10671131.html