想用crontab每小时执行一次命令,这两个命令到底用哪个?

62次阅读

共计 456 个字符,预计需要花费 2 分钟才能阅读完成。

* */1 * * * /etc/init.d/smb restart
0 */1 * * * /etc/init.d/smb restart
这两个哪个是正确的?注意标红的地方 想用 crontab 每小时执行一次命令,这两个命令到底用哪个?

0 * * * * /etc/init.d/smb restart
这样不就行了吗 0 */1 * * *
一般都会先用 https://crontab.guru/ 去检查 想用 crontab 每小时执行一次命令,这两个命令到底用哪个?1 * * * * * /etc/init.d/smb restart
不应该是这样吗,?* * 0/1 * * ? 这样子吧 想用 crontab 每小时执行一次命令,这两个命令到底用哪个?https://tooltt.com/crontab/c/29.html0 * * * * 二楼正解 0 * * * *
0 */1 * * *https://crontab.guru/#0_*/1_*_*_*
0 */1 * * *
next at 2023-01-07 22:00:00
then at 2023-01-07 23:00:00
then at 2023-01-08 00:00:00
then at 2023-01-08 01:00:00
then at 2023-01-08 02:00:00 复制代码

正文完
 0