pythondjangowindowsperiodic-task

Run tasks every day at 8am in Django on Windows


I am working on a web app in Django and I need to send some random numbers to the database every day at 8am.

I have tried to use celery but it has not worked. I am using windows and from a tutorial I understand celery does not work on windows.

I have tried using django-extensions and django-cron but it needs changes made to the linux cron and as I said before, I am on windows.

How should I solve this? Any help would be appreciated.


Solution

  • Finally I've found a good way to do the job. In same situations like mine, you can use APScheduler as a strong tool when scheduling is needed:

    https://apscheduler.readthedocs.io/en/stable/index.html


    Update :

    For doing some jobs periodically, you can also use Schedule as a simple and useful tool: https://schedule.readthedocs.io/en/stable/