Skip to content

Instantly share code, notes, and snippets.

@ethandrower
Created October 10, 2019 14:40
Show Gist options
  • Save ethandrower/abcc62838095c1434b12f63d89cd0e3f to your computer and use it in GitHub Desktop.
Save ethandrower/abcc62838095c1434b12f63d89cd0e3f to your computer and use it in GitHub Desktop.
Crontab for using Python Virtualenv and Django Command
SHELL=/bin/bash
## IMPORTANT TO SET SHELL TO BASH, SH shell does not support the 'source' command.
#crontab config
#Command 1 (15 minute intervals) if post is less than 3 hours old:
*/15 * * * * source /root/ga-vt/3env/bin/activate && cd /root/ga-vt && python manage.py [command_name_here]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment