anjanesh Yes, here is an example of a cron job that should work:
0 * * * * cd ~/apps/your_django_app/your_project && ~/apps/your_django_app/env/bin/python manage.py customCommand >> ~/logs/apps/your_django_app/cron.log 2>&1
What's happening here is:
- Change to the project directory:
cd ~/apps/your_django_app/your_project
- Run the management command using Python from your app's env:
~/apps/your_django_app/env/bin/python manage.py customCommand