How to set virtualenv for a crontab?
I want to set up a crontab to run a Python script. Say the script is something like: #!/usr/bin/python print "hello world" Is there a way I could specify a virtualenv for that Python script to run in? In shell I'd just do: ~$ workon myenv Is there something equivalent I could do in crontab to activate a virtualenv? Andy White If you're using "workon" you're actually using "virtualenv wrapper" which is another layer of abstraction that sits on top of virtualenv. virtualenv alone can be activated by cd'ing to your virtualenv root directory and running: source bin/activate workon is a command