how to set up cron, django project

I have a Python script on my hosting in a Django project, I need to run this script every day at 8:00. In Cron, I execute the command:
ssh localhost -p222 source ~/webbet/venv_django/bin/activate && cd webbet && python public_html/ result
The script does not start. Помогите, друзья.
Help, friends. Can do with Bash file creation, write the required commands please

This really isn’t a Django issue - I’d say it looks more like a bash / cron issue. You might find better / more direct help in a more appropriate forum.

I’d try wrapping the command portion in single quotes. I’m suspecting the order of operations is getting confused when the system goes to run that cronjob.

ssh localhost -p222 'source ~/webbet/venv_django/bin/activate && cd webbet && python public_html/ result'
1 Like

Thank you very much, you are the best!