每9天从Cron启动脚本
我看到了一些问题,涉及每天开始启动cron。但是我无法理解一些逻辑步骤的工作方式。
我需要每9天启动一次cron,以获取一个脚本(发送给电子邮件),每10天(服务器电源),然后每14天(发送通用电子邮件)和每15天(删除服务器)。
如果您能帮助我理解逻辑,它是如何工作的,我会很高兴。
For example, how to set cron job for every 45 days:
10 13 * * * test $((
date +%s/24/60/60\%45 )) = 41 & ;& your_script
,但我可以理解我应该在情况下更改什么? 45至9?
,45至10?
您能提供建议吗?
I saw some questions hire, about how start cron every n-days. But I can not understand some logical steps how it works.
I need to start cron every 9 days for one script (send notofication to email), every 10 days for others (poweroff the server), then every 14 days (send notofication email) and every 15 days (delete the server).
If you could help me understand logical, how it works, I would be glad.
For example, how to set cron job for every 45 days:
10 13 * * * test $((
date +%s/24/60/60\%45 )) = 41 && your_script
but I can understand what I should to change to use in my case? 45 to 9?
, 45 to 10?
Could you please help with advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
建议阅读有关
cron
调度另外,您可以练习调度配置在这里。
Suggesting to read more about
cron
scheduling here.Also you can practice the scheduling configuration here.