I have made a few Mac daemons in the past. They either run at launch or run at a specific time interval, for example, once every hour.

I would like to know if it's possible to run a program on an event. Particularly, I would like the script to be executed when a specific file on the hard drive is edited.

Looking up the guides on launchd, I can't find any mention of anything like this. I'm guessing I just don't know the right wording for what this is called. Or perhaps this isn't possible?

Could anyone please give me some pointers as to how to get started with something like this?


1 Answer 1


Launchd plists have WatchPaths (but the man page recommends against its use). Whether it is useful in your case depends on the way the files you want to watch out for are updated, and on the actual action you want to take.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .