Linux任务时间表为时,分,秒 [英] Linux task schedule to Hour, minute, second

查看:94
本文介绍了Linux任务时间表为时,分,秒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在特定时间运行shell脚本,直到它的秒(H:M:S)为止,但是到目前为止,所有at之类的程序都只能运行特定的分钟(而不是秒).
我不想使用sleep,因为它不准确.由于某种原因,它比原计划提前了几个小时结束!

I'm trying to run a shell script at a specific time up to it's seconds (H:M:S) , but so far all programs such as at only go up to a specific minute (not second).
I don't want to use sleep since it's not accurate. For some reason it ended couple of hours earlier than it was supposed to!

推荐答案

您的问题似乎并未定义准确性,但始终存在一些抖动.您可以使用 Quartz 安排到秒.您还可以使用atcron安排分钟,然后休眠适当的秒数.

Your question doesn't seem to define accuracy, but there is always some jitter in scheduling in electronic devices. You might use quartz to schedule to the second. You could also use at or cron to schedule to the minute and then sleep the appropriate number of second(s).

这篇关于Linux任务时间表为时,分,秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆