# how to set up cron, django project

**URL:** <https://forum.djangoproject.com/t/how-to-set-up-cron-django-project/9169>\
**Category:** Using Django\
**Created:** [August 10, 2021, 3:45pm UTC](https://forum.djangoproject.com/t/how-to-set-up-cron-django-project/9169 "2021-08-10T15:45:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![beloe04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beloe04/32/5178_2.png) [@beloe04](https://forum.djangoproject.com/u/beloe04)\
**Post date:** [August 10, 2021, 3:45pm UTC](https://forum.djangoproject.com/t/how-to-set-up-cron-django-project/9169/1 "2021-08-10T15:45:16Z")

</div>

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/manage.py result  
The script does not start. Помогите, друзья.  
Help, friends. Can do with Bash file creation, write the required commands please

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 10, 2021, 3:49pm UTC](https://forum.djangoproject.com/t/how-to-set-up-cron-django-project/9169/2 "2021-08-10T15:49:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![CodenameTim](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/codenametim/32/31507_2.png) [@CodenameTim](https://forum.djangoproject.com/u/CodenameTim)\
**Post date:** [August 10, 2021, 8:24pm UTC](https://forum.djangoproject.com/t/how-to-set-up-cron-django-project/9169/3 "2021-08-10T20:24:54Z")

</div>

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.

```auto
ssh localhost -p222 'source ~/webbet/venv_django/bin/activate && cd webbet && python public_html/manage.py result'

```

---

<div class="post-metadata">

**Author:** ![beloe04](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beloe04/32/5178_2.png) [@beloe04](https://forum.djangoproject.com/u/beloe04)\
**Post date:** [August 11, 2021, 1:32am UTC](https://forum.djangoproject.com/t/how-to-set-up-cron-django-project/9169/4 "2021-08-11T01:32:04Z")

</div>

> [@CodenameTim](#):
>
> 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.

Thank you very much, you are the best!
