0

I have a script that I want to run every 182 seconds. As you know, cronjob precision is minutes so first I want to ask how can I run my code as a job every 182 seconds?

Secondly, I want to ask is there any better and efficient solution as cronjob is, to run a command periodically with a better precision than cronjob? I heard about some alternative options like watch command. However, I want a comparison between these options and cronjob and possible advantages or disadvantages each one has.

  • Welcome to the Ask Ubuntu community. As your question doesn't appear to be related to the Ubuntu OS specifically, I'd suggest that you ask this question over on the Unix/Linux site instead (here's something I found that might help answer your question: https://unix.stackexchange.com/q/602792/60677). But in short, unless you're using a real-time OS (which the standard Ubuntu is not), the precision your looking for will be difficult to guarantee with any level of consistency (your best bet will be +/- a few seconds). – richbl Feb 19 '23 at 01:30

0 Answers0