I tried os.system, os.spwanl, etc.. but it doesn't work well
I need to execute some background process from django application.
We can configure a new daemon thread to execute a custom function that will perform a long-running task, such as monitor a resource or data. For example we might define a new function named background_task(). Then, we can configure a new threading. Thread instance to execute this function via the “target” argument.
Django Q is a native Django task queue, scheduler and worker application using Python multiprocessing.
A simple background task worker that uses your Django database and admin for management. This project is meant for small to medium scale uses. If you need something more, check out Celery.
Try to use celery. It was originally created for this purpose and also supports scheduling tasks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With