【发布时间】:2023-02-01 03:38:34
【问题描述】:
我需要每 90 秒执行一次 cron 表达式,即每 1.5 分钟运行一次
我试试 * * * ? * * 睡 90 分钟;但它说这个职位的非法字符:'SLE'
【问题讨论】:
我需要每 90 秒执行一次 cron 表达式,即每 1.5 分钟运行一次
我试试 * * * ? * * 睡 90 分钟;但它说这个职位的非法字符:'SLE'
【问题讨论】:
这取决于您在其中运行作业的上下文,但错误非常明显:cron 配置参数设置不正确。
从下面的第一个链接,这些是一些例子:
# backup using the rsbu program to the internal 4TB HDD and then 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 first of the month
# 25 04 1 * * /usr/bin/dnf -y update
cron 有大量的在线文档和操作方法。以下是我发现的一些:
还有一些免费的网络工具可以帮助您得出完美的配置:
这只是 cron 或 how to use cron 快速谷歌的一个小样本。
【讨论】: