简体   繁体   English

Linux任务时间表为时,分,秒

[英]Linux task schedule to Hour, minute, second

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). 我正在尝试在特定的时间运行shell脚本,直到它的秒数(H:M:S)为止,但是到目前为止,所有程序(例如) at只能运行到特定的分钟(而不是秒)。
I don't want to use sleep since it's not accurate. 我不想使用sleep因为它不准确。 For some reason it ended couple of hours earlier than it was supposed to! 由于某种原因,它比原计划提前了几个小时结束!

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). 您还可以使用atcron计划时间,然后休眠适当的秒数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM