Thanks for the WatchPath behavior change
I've also noticed, in the theme of being thankful for changes in Leopard, that the behavior for the WatchPath key is different. I believe that change is for the better. In Leopard, both creating and deleting the watched path results in any job waiting for its modification to fire. This is great -- in Tiger, my experience was that the path always had to exist and that made WatchPath more limited and less useful. One question though: since removing the path also runs the job, is there a way to avoid that specific behavior? To only have the job run if the path is created or is modified in place (without deletion)? I know that that case is probably one where the QueueDirectory key should be used instead, but I figured I'd ask. Again, thanks! -- Jeremy
On Dec 5, 2007, at 10:50 AM, Jeremy Reichman wrote:
One question though: since removing the path also runs the job, is there a way to avoid that specific behavior? To only have the job run if the path is created or is modified in place (without deletion)? I know that that case is probably one where the QueueDirectory key should be used instead, but I figured I'd ask.
Don't know the answer to that, but it'd be simple enough (and in all likelihood highly advisable) to throw a quick sanity check at the top of the script that immediately exits if whatever it needs isn't there.
On Dec 5, 2007, at 10:54 AM, Nathan Duran wrote:
On Dec 5, 2007, at 10:50 AM, Jeremy Reichman wrote:
One question though: since removing the path also runs the job, is there a way to avoid that specific behavior? To only have the job run if the path is created or is modified in place (without deletion)? I know that that case is probably one where the QueueDirectory key should be used instead, but I figured I'd ask.
Don't know the answer to that, but it'd be simple enough (and in all likelihood highly advisable) to throw a quick sanity check at the top of the script that immediately exits if whatever it needs isn't there.
I'd agree with Nathan. That is the best thing you can do for Leopard. We might fix that in a future release. davez
participants (3)
-
Dave Zarzycki
-
Jeremy Reichman
-
Nathan Duran