Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
cd /path/to your/virtual environment #path to your virtual environment
. bin/activate #Activate your virtual environment
cd /path/to your/project directory #After that go to your project directory
python runserver #run django server
After that save this file with .sh extension. I have saved this file as in the following example.
Run following command in terminal for giving execution permission to your script
$ chmod u+x
4. To test your script works perfectly, add following command in terminal
$ ./
5. After that, you have to create cron job on your machine for run script automatically on reboot give following command in terminal
$ crontab -e
Above command will open crontab window, then add the following line in it:
@reboot path/to/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.