first things first, if you use queue_task in a model, every request a task will get queued.
Second thing: enable the debug log to see what a task prints out with -D 0 Third: the scheduler is supposed to be a quasi-daemonic process: you usually want to read the results from the scheduler_run table, where you are supposed to look for results ^_^ Fourth: check the scheduler_task table (and the status column) to see what the scheduler is doing/processing. On Tuesday, September 3, 2013 3:03:36 PM UTC+2, Alfonso de la Guarda Reyes wrote: > > Hi, > > I have recently start to use the scheduler module which looks great, > but when i try to use a simple example simply doesn't works, any > additional works requires? > > created a scheduler.py inside models which contains > > ------------------------------------------------------- > from gluon.scheduler import Scheduler > > def task_add(a,b): > print "MAMAMA" > return a+b > > scheduler = Scheduler(db) > > scheduler.queue_task(task_add,pvars=dict(a=1,b=2)) > ----------------------------------------------------------------------------- > > > And run with: > > python2 Devel/web2py/web2py.py -K smart_media_campaign > > Simply doesn't prints the "MAMAMA" message on the console, how can i > sure it works? > > Is there anything wrong? > > Regards,! > > Saludos, > > -------------------------------- > Alfonso de la Guarda > Twitter: @alfonsodg > Redes sociales: alfonsodg > Telef. 991935157 > 1024D/B23B24A4 > 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 > -- --- 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/groups/opt_out.