cron

Is it possible to schedule cron job when changes are detected


I'm setting up my first cron-job and I know I can have it run at specific times every day for example. However, I would really like to only run the command if it detects a change or new file added to a folder. Is that possible with cron? If not, is there another program that would be able to run a command like that (only when it detects changes in a folder). I am running Ubuntu 14.04. Thanks for the help!


Solution

  • What you need is iWatch. It watches files or directories for changes, then runs whatever command you specify.