survos / rapidpro

RapidPro allows organizations to visually build scalable interactive messaging applications.
Other
0 stars 1 forks source link

Document how to create timed celery tasks #4

Open tacman opened 8 years ago

tacman commented 8 years ago

We need to understand how to use celery to schedule tasks at a specific time. For example, a list that has emails and a timestamp.

You can do a script in Django, as it seems there's already support for this.

So imagine we want to send an email at these exact times:

bob@abc.com,2016-07-29 23:12:20,Take the red pill now.
alice@abc.com,2016-07-29 22:12:20,Take the blue pill now.
bob@abc.com,2016-07-29 20:42:20,Please report your temperature

There are several articles about how to do this, but these may be old.
https://www.caktusgroup.com/blog/2014/06/23/scheduling-tasks-celery/ http://engineering.hackerearth.com/2013/06/05/scheduling-emails-with-celery-in-django/

We should also install some sort of monitoring tool, like flower:

https://flower.readthedocs.io/en/latest/