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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…