I've been reading about web2py's cron and sheduler ([1] and [2]) Also, I've read a post where Massimo says "Please use the scheduler, not cron. Cron must die." [3]
Now I'm creating a web2py app and I want the user to be able to configure a daily background task. The task consist in sending a newsletter to subscribers. The task doesn't take too much time to complete (because the app doesn't use smpt; it connects to an API so the sending is handled by an external service). So the task only makes some query to the database, connect to the API, give the order to send, and disconnect. The thing is: I want the user to be able to configure the time that the newsletter is sent. For example, the user may configure the sending of the newsletter from monday to friday at 8am, but not saturdays o sundays. In this scenario, I first thought that cron would be the way to go. However I read that Massimo's comment ("cron must die") so I don't know what to use. I find that scheduler is very complete and robust, but I don't know if it's the best option for this case, considering that the task runs in very little time and only once a day. I'm worried about resource consumption, because the same app is installed multiple times on production, serving multiple websites, so there would be multiple workers running on background (maybe idle workers, however they would take some memory space I guess). Any tip or comments? Does anyone dealed with something similar? I want to remark the idea that the user must be able to change configuration about the scheduled task. Thanks in advance! [1] http://web2py.com/books/default/chapter/29/04/the-core#Running-tasks-in-the-background [2] http://web2py.com/books/default/chapter/29/13/deployment-recipes#Start-the-scheduler-as-a-Linux-service--upstart- [3] https://groups.google.com/forum/#!searchin/web2py/cron$20must$20die/web2py/qW_ODOj3nMM/8hbZ6etJsvcJ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.