Shell script with nohup is not working

Check out incrond for inotify usage.

Please use code tags for your future queries!

Here is a simple example incorporating your code for check, please declare MAIL variable, as i did not.

#!/bin/bash
python mail.py $1 $2 $MAIL

And incron installed with entry as follows :

/directory/to/watch	IN_CLOSE_WRITE,IN_MOVED_TO   /path/to/script/script.sh $@ $#

Hope that helps
Regards
Peasant.

2 Likes