The docs says,
In Django Background Task, all tasks are implemented as functions (or any other callable).
There are two parts to using background tasks:
creating the task functions and registering them with the scheduler
setup a cron task (or long running process) to execute the tasks
It appears there is no way to run django-background-tasks indefinitely and periodically, is that correct?
If I am understood correctly then You want to execute your tasks periodically without using cron.
You can do using django celery( https://github.com/celery/django-celery ) or Task Master ( https://github.com/dcramer/taskmaster )
Hope you are wanting this.
you can run the task indefinitely with the repeat like this.
task_method(repeat=300)
this task will repeat every 300 secconds you can check the docs here https://django-background-tasks.readthedocs.io/en/latest/#repeating-tasks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.