[Tutor] python watchfolder as daemon
Alex Hunsley
lard at tardis.ed.ac.uk
Thu Nov 10 18:02:23 CET 2005
Frank Hoffsümmer wrote:
>Hello all,
>I found this gem of a python recipe that allows me to monitor a hierarchy of
>folders on my filesystem for additions / changes / removals of files:
>http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215418
>
>I would like to monitor a folder hierarchy using this script but now I
>wonder what would be the best way to have this watchfolder script running at
>all times in the background?
>
>nohup python watchfolder.py myfolder &
>
>? would that be suitable?? or is there a way to launch a process like that
>from python that detaches itself from the shell?
>
>
Using nohup should certainly work fine.
Make sure you understand what happens to any standard (etc.) output
from your script when you use it with nohup - i.e. read the nohup man page!
alex
More information about the Tutor
mailing list