I want a simple crontab rule such as :
/path/to/file IN_MODIFY echo "Incron triggered"
to function on a Linux VM that has a webserver.
The steps are :
1: Fill out forms in webpage to change datas.
2: Validating the forms activate a python script that opens, writes and closes the involved file
3: The incron rule should trigger but does not !
I can't change the way it works (Step1-2) and I got it to work with cron, but I want the trigger to be immediate rather than having to wait a few minutes for cron rule to start.
So far here is what I know/I've tried :
-Modifying the file manually DOES trigger the incron.
-Going with ls -lrt
command shows timestamp modified to a new date (modification date).
-The involved file "belongs" to user "apache" and filepath too.
-Python script correctly opens/writes/closes the file (f.open(), f.write(), f.close()).
-I have tried the "IN_ALL_EVENTS", it does work manually, but still not when web modified.
Could someone guide me ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…