When my door motion detector sends an event over MQTT, I want to read a camera and transform the image with imagemagick. It can happen that there is another motion event while the previous image is still being processed, but the new one should be process not until the previous one is finished.
So the naive idea is to use a queue
Unfortunately
Even the minimal one minute granularity is not good enough. Actually, I'd expect at now to run now.
Any ideas how to run queued jobs immediately?
So the naive idea is to use a queue
Bash:
echo 'process_motion_event' | at -q a now
Unfortunately
Note that at is implemented through the cron(8) daemon by calling atrun(8) every five minutes. This implies that the granularity of at might not be optimal for every deployment. If a finer granularity is desired, the /etc/cron.d/at file can be edited
Even the minimal one minute granularity is not good enough. Actually, I'd expect at now to run now.
Any ideas how to run queued jobs immediately?