The short answer
The short answer is No. There is no port of Kue to MongoDB, nor there are any plans for such. There are no other open-source popular projects offering similar functionality at the moment.Moreover Redis seems like a better fit to this sort of project any-way.
The long answer
While Kue is very interesting and offers much more than just delayed tasks, it seems your requirements are much simple.
If all you need is to send users an email one month after signing up, or that sort of thing, it is usually built into the OS level.
What I suggest you do, assuming you have a sendEmail
method (in general, that you figured out how the tasks would be done) is the following:
- Depending on the operating system, schedule
sendEmailHandler
a task to run once a day. In Windows this is done with "Scheduled Tasks"
, in OS X, BSD and Linux this is done using cron
. (cron tutorial). Most PaaS options also have this sort of option (Like nodejitsu, Azure...).
- That tasks should be a node.js script that iterates through a list of long running tasks (that is, stuff that runs once a month, a week, or longer).
- In
MongoDB
which you choose to use, hold a collection of tasks,each with a 'start time'. An example for such tasks would be a specific user getting an email after 1 month.
- In your
sendEmailHandler
script, check which tasks should run, and execute them, after which you should remove them from the MongoDB collection
.
While this sounds like some work, it shouldn't take too long. All the code described here is very straightforward.
Kue lets you do stuff like priority, attempts, progress, etc which you do not need if I understand correctly. Working with a library that does many things to do something simple might end up biting you since degugging and maintenance are usually harder.
Good luck! Feel free to let me know if you'd like me to elaborate more on a specific part.