Answer by wisbucky for How to set virtualenv for a crontab?
I'm not sure about workon, but it's pretty straightforward for venv. The only thing to remember is that crontab uses sh by default, not bash, so you need to use the . command instead of source.Here are...
View ArticleAnswer by Ross Rogers for How to set virtualenv for a crontab?
With bash, you can create a generic virtual env wrapper that you can use to invoke any command, much like how time can wrapper any command.virt_env_wrapper.bash:#!/bin/bash source...
View ArticleAnswer by Mike Pennington for How to set virtualenv for a crontab?
Is there something equivalent I could do in crontab to activate a virtualenv?This works well for me...## call virtualenv python from crontab0 9 * * * /path/to/virtenv/bin/python...
View ArticleAnswer by Andy White for How to set virtualenv for a crontab?
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...
View ArticleHow 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/pythonprint "hello world"Is there a way I could specify a virtualenv for that Python script to run in? In...
View Article