Any way to prevent reloading of running watches when adding to crontab?

From: Euan Maxwell <euanmaxwell_at_gmail.com>
Date: Wed, 30 Sep 2009 15:04:39 +0100

Hi there,

Is there any way to add new watches to the incrontab and load them
without re-arming existing watches?

I'm using incron with IN_NO_LOOP so that the watches are not triggered
again while the script is running.

This suits my use case as I'm really watching for the start of an
"event" in a list of directories which normally involves lots of files
hitting it in short order. The script then processes this "event" and
only exits when complete, re-arming the watch in the process.

This all works fine, however, if I add a new watch and there are
existing events in progress, the watches all trigger again.

To be clear, I only want the script to run when the FIRST file lands,
not with each subsequent file (until the called script ends).

Now, I can build some complexities into my own code to somehow check
for any in-progress events pertaining to that particular directory,
but, I was just wondering if there is any way to handle this from
within incron?

Thanks,

Euan.
Received on Tue Jun 05 2012 - 22:14:21 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST