Quantcast
Channel: How to set virtualenv for a crontab? - Stack Overflow
Viewing all articles
Browse latest Browse all 5

How to set virtualenv for a crontab?

$
0
0

I want to set up a crontab to run a Python script.

Say the script is something like:

#!/usr/bin/pythonprint "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?


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>