holy fuck. you have a video on everything. One of my projects im building i needed to run a background task every x minutes to fetch api data from twitch and i have been struggling all day to figure out how to smoothly execute a background tasks repeatedly. Thank you!!!
Hahaha thank you! There's loads of topics I'd like to cover that I've not had time to do yet - so not everything ... yet ;) I'm glad this one was useful!
Thanks. I've tried to create cron jobs with django-extentions but with a little success. Could you please make a video how to setup cron jobs that way.
Should there be concern on using django-crontab as it has not been updated in over 4 years? Also, if the server this is running on gets rebooted, do I need to re-run the con tab add command or will it fire up on its own?
For your first point - you raise a good question. I would say that it doesn't look good for django-crontab, unfortunately. It's probably best avoided in new Django apps going forward. There seems to be a better maintained package for the same task here: github.com/tivix/django-cron For your second question, after you add the Django cronjobs with the 'add' command, it should persist in the system's crontab. So no need to re-run when the server reboots.
great video ! But i have a issue with CMD "service cron start" in Dockerfile , it won't start cron when built but if I manually run the start cron command in container, it works.
Thank you! Are you starting the cron service as part of the run command, *along* with the Django runserver command? For example in my Dockerfile, the CMD is: CMD service cron start && python manage.py runserver 0.0.0.0:8000 You need to run these together, as part of the command. Are you already doing this?
Very useful video, it explained and demoed exactly what I needed to accomplish. Thank you!
Thanks a lot! Glad to hear it helped!
great video. I would like to suggest making a video integrating django-components with htmx. I think those two packages would pair up really nice.
Thank you - that sounds interesting. I had a quick look at django-components, looks good! I'll research this suggestion further, soon. Thanks again.
Thank you for making useful video.
You are welcome!
holy fuck. you have a video on everything. One of my projects im building i needed to run a background task every x minutes to fetch api data from twitch and i have been struggling all day to figure out how to smoothly execute a background tasks repeatedly. Thank you!!!
Hahaha thank you!
There's loads of topics I'd like to cover that I've not had time to do yet - so not everything ... yet ;)
I'm glad this one was useful!
Really nice!
Thank you!
Nice video! Thanks for creating it.
Cheers!
It is giving me an error with the environment variables, when the task is executed it does not detect them
Thanks. I've tried to create cron jobs with django-extentions but with a little success. Could you please make a video how to setup cron jobs that way.
Hi - thanks for the suggestion, I'll maybe make a short video on this soon.
Should there be concern on using django-crontab as it has not been updated in over 4 years? Also, if the server this is running on gets rebooted, do I need to re-run the con tab add command or will it fire up on its own?
For your first point - you raise a good question. I would say that it doesn't look good for django-crontab, unfortunately. It's probably best avoided in new Django apps going forward.
There seems to be a better maintained package for the same task here: github.com/tivix/django-cron
For your second question, after you add the Django cronjobs with the 'add' command, it should persist in the system's crontab. So no need to re-run when the server reboots.
@@bugbytes3923 @ErrorBytes can i schedule a task to run daily(django-cron)
@@AndresNavarro-im8nq Hi Andres - for sure, you can do that!
Nice video ! Is there is anyidea why it dont work on schedule after i deploy on railway
great video ! But i have a issue with CMD "service cron start" in Dockerfile , it won't start cron when built but if I manually run the start cron command in container, it works.
Thank you! Are you starting the cron service as part of the run command, *along* with the Django runserver command? For example in my Dockerfile, the CMD is:
CMD service cron start && python manage.py runserver 0.0.0.0:8000
You need to run these together, as part of the command. Are you already doing this?
@@bugbytes3923 I use nginx with gunicorn.
in my Dockerfile:
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"]
@@electroe2143 how did you solve it?
Can't work on windows 😭
Agree, such a pain with that wsl2!