I started with that only, but it is still now working.
SO I'll tell you what I did.
I made a file sched.py
*# coding: utf8**
**def fun():**
**    import time**
**    print 'selecting mails'**
**    rows = db(db.queue.status=='pending').select()**
**    for row in rows:**
**        print 'sending mails'**
**        if mail.send(to=row.email,**
**            subject=row.subject,**
**            message=row.message_body):**
**            row.update_record(status='sent')**
**        else:**
**            row.update_record(status='failed')**
**        db.commit()**
****
**from gluon.scheduler import Scheduler**
**Scheduler(db,dict(func=fun))*

then I edited the table scheduler_task
these are my values
scheduler_task.id scheduler_task.application_name scheduler_task.task_name scheduler_task.group_name scheduler_task.status scheduler_task.function_name scheduler_task.uuid scheduler_task.args scheduler_task.vars scheduler_task.enabled scheduler_task.start_time scheduler_task.next_run_time scheduler_task.stop_time scheduler_task.repeats scheduler_task.retry_failed scheduler_task.period scheduler_task.timeout scheduler_task.sync_output scheduler_task.times_run scheduler_task.times_failed scheduler_task.last_run_time scheduler_task.assigned_worker_name 2 b/appadmin mail main QUEUED func 85ebf3d6-35f8-4c6a-ac08-6477ee2af6b7 [] {} True 2013-10-16 17:26:38 2013-10-16 17:26:38 <NULL> 3 0 10 60 0 3 0 <NULL> tushar-VPCEB26FG#26573



and then I used this command
python web2py.py -K appName -D 0


it is still not sending mails and I get this in the console
"DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:looping...
INFO:web2py.scheduler.tushar-VPCEB26FG#26573:nothing to do
DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:sleeping...
DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:........recording heartbeat (ACTIVE)
DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:looping...
INFO:web2py.scheduler.tushar-VPCEB26FG#26573:nothing to do
DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:sleeping...
DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:........recording heartbeat (ACTIVE)
DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:looping...
INFO:web2py.scheduler.tushar-VPCEB26FG#26573:nothing to do
DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:sleeping...
DEBUG:web2py.scheduler.tushar-VPCEB26FG#26573:........recording heartbeat (ACTIVE)


thanks,

regards,

Tushar Tuteja
"
On Wednesday 16 October 2013 06:34 PM, Niphlod wrote:
ok. start it with
python web2py.py -K appName -D 0
that sets to DEBUG the logging level

Il giorno mercoledÄ› 16 ottobre 2013 14:46:53 UTC+2, Tushar Tuteja ha scritto:

    Ubuntu 12.04
    i use the command
    python web2py.py -K appName

    On Wednesday 16 October 2013 05:53 PM, Niphlod wrote:
    a) what ubuntu ?
    b) how do you start the scheduler ?



    Il giorno mercoledÄ› 16 ottobre 2013 14:06:41 UTC+2, Tushar Tuteja
    ha scritto:

        Hey I am using web2py on ubuntu.
        I am trying to use the scheduler but there is not workers
        name that is coming .
        and the task is always queued and it never runs.
        I followed the video on Vimeo on scheduler.
        it runs on mac but not on ubuntu.
        apparently my app is hosted on a ubuntu server.

-- Resources:
    - http://web2py.com
    - http://web2py.com/book (Documentation)
    - http://github.com/web2py/web2py
    <http://github.com/web2py/web2py> (Source code)
    - https://code.google.com/p/web2py/issues/list
    <https://code.google.com/p/web2py/issues/list> (Report Issues)
    ---
    You received this message because you are subscribed to a topic
    in the Google Groups "web2py-users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/web2py/Zs7NODudXSE/unsubscribe
    <https://groups.google.com/d/topic/web2py/Zs7NODudXSE/unsubscribe>.
    To unsubscribe from this group and all its topics, send an email
    to web2py+un...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out
    <https://groups.google.com/groups/opt_out>.

--
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 a topic in the Google Groups "web2py-users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Zs7NODudXSE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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/groups/opt_out.

Reply via email to