Scheduling a regular event: Cron/Cron alternatives (including Celery)

前端 未结 4 1001
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-03 10:56

Something I\'ve had interest in is regularly running a certain set of actions at regular time intervals. Obviously, this is a task for cron, right?

Unfortunately, the In

4条回答
  •  佛祖请我去吃肉
    2021-02-03 11:31

    A simple, non-Celery way to approach things would be to create custom django-admin commands to perform your asynchronous or scheduled tasks.

    Then, on Windows, you use the at command to schedule these tasks. On Linux, you use cron.

    I'd also strongly recommend ditching Windows if you can for a development environment. Your life will be so much better on Linux or even Mac OSX. Re-purpose a spare or old machine with Ubuntu for example, or run Ubuntu in a VM on your Windows box.

提交回复
热议问题