help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically run a script every n seconds


From: Kwan Lowe
Subject: Re: Automatically run a script every n seconds
Date: Sat, 4 Apr 2020 22:18:30 -0400

On Sat, Apr 4, 2020 at 4:56 PM Dr.-Ing. Dieter Jurzitza
<address@hidden> wrote:
>
> Hello babelproofreader,
> in Linux you could put this in a crontab entry.

Crontab works great normally and is valid. In this case, however, it
may not have sufficient timer resolution if it needs to run on
seconds.

If you are running systemd, there is a high-resolution timer
available. (https://www.certdepot.net/rhel7-use-systemd-timers/)

This said, it may be worthwhile to use a loop within Octave. It would
depend on whether the task needs to sync to an external clock or can
use a "sloppy" timer. I.e., if it needs to run at the 5s or 10s after
the minute, then
polling the system clock could work with the caveat that Linux is not
hard real time.  (https://lwn.net/Articles/734694/)




-- 
"Don't be lazy. Do the thing. Do it properly."  - Simone Giertz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]