python - Is it possible to use venvs (virtual environments) with incron? -
i can't see anywhere showing examples of how use virtual environments incron http://inotify.aiken.cz/
does know if possible?
update: run incrontab -e add line:
/home/vmail/jobstat.us/submit/new/ in_create /home/vmail/jobstatuspy3/bin/python3 /home/vmail/mailtounicodetoarchive.py --context=prd however when try run same command line i.e.
/home/vmail/jobstatuspy3/bin/python3 /home/vmail/mailtounicodetoarchive.py --context=prd it says
vmail@mail:~$ /home/vmail/jobstatuspy3/bin/python3 /home/vmail/mailtounicodetoarchive.py --context=prd traceback (most recent call last): file "/home/vmail/mailtounicodetoarchive.py", line 14, in <module> me = singleton.singleinstance() nameerror: name 'singleton' not defined obviously above error because it's not executing command in venv , tendo module installed in venv not work.
any thoughts on how venvs work incron?
write shell script commands use activate virtual environment , run program.
then setup incron run shell script.
Comments
Post a Comment