在Linux中怎么使用cron计划任务

数据库2025-11-05 03:40:581
在Linux中怎么使用cron计划任务
复制# crontab -e  SHELL=/bin/bash  MAILTO=root@example.com  PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin  # For details see man 4 crontabs  # Example of job definition:  # .---------------- minute (0 - 59) # |  .------------- hour (0 - 23) # |  |  .---------- day of month (1 - 31) # |  |  |  .------- month (1 - 12) OR jan,使用feb,mar,apr ... # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # |  |  |  |  |  # *  *  *  *  * user-name  command to be executed  # backup using the rsbu program to the internal 4TB HDD andthen 4TB external  01 01 * * * /usr/local/bin/rsbu -vbd1 ; /usr/local/bin/rsbu -vbd2  # Set the hardware clock to keep it in sync with the more accurate system clock  03 05 * * * /sbin/hwclock --systohc # Perform monthly updates on the firstof the month # 25 04 1 * * /usr/bin/dnf -y update 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.
本文地址:http://www.bzuk.cn/html/022e9299885.html
版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

全站热门

神舟战神K660D-i7D2(探索神舟战神K660D-i7D2的独特之处,解锁极致游戏性能)

登月50年 | 她的一串代码让人类登月 是程序员永恒的女神

Java程序员五面阿里成功逆袭斩下Offer,太不容易了

一年后,面对GitHub,开发者不再担忧它背后的微软

iPhone精选照片添加流程(轻松记录生活中的美好瞬间)

2019年你应该知道的编程语言、框架和工具

3年工作经验,工作中还不会使用多线程?阿里P6:别慌,我都总结好了

如何进行高效的源码阅读:以Spring Cache扩展为例带你搞清楚

友情链接

滇ICP备2023006006号-33