I have data extract that gets updated by another server. I want to run a script whenever that file is updated.
My incron task looks similar to:
/path/to/file IN_MODIFY php -f /path/to/script.php -- -arg val -arg val
This task does not run when the file is overwritten. The timestamp on the file changes. The data in the file changes, but the incron task does not run.
This is on a Ubuntu 12.04 server.
The file is overwritten when the remote server sftp/scp's a new version over the top of it.
When I tried the IN_CLOSE mask and edited the file manually, it spawned hundreds of tasks.
Using IN_ATTRIB spawns the task multiple times when I edit the file manually.
IN_CLOSE_WRITE does not work at all when the file is overwritten by the upload.
So, what am I missing? All I want is for the task to run one time when the file is modified by the upload....
0 Answers