Run a command on an interval or on file/directory changes