0

I am implementing a task scheduling system in Django. User will select a task e.g. send email and will set a very specific time and date for task execution.

I found with Celery you can set up a task like

    @Task
    def email(address):
        // Send email logic 

But how can I trigger it at specific time? For PeriodicTasks in celery one have to specify execution time and frequency upfront. How can i add execution date and time on the fly?

Is their any method in Celery e.g. add.schedule(date="SOME_DATA") or any other ways i can solve this use case.

kodeshpa
  • 549
  • 5
  • 14

1 Answers1

3

Periodic tasks is just only one feature of the celery. There are a hell lot of other features it supports.

You can use celery for this case. You can define a simple celery task to do something. Later when user submits/clicks a particular task, you just write a simple code to connect it to that task. Then that task will be executed by celery.

Checkout first steps with django. Also, Celery is a very advanced async task delegation and processing system.

Redis queue is a much simpler async task processor and lightweight. If you have some simple tasks to do, you can use this

Chillar Anand
  • 27,936
  • 9
  • 119
  • 136