let take a example , i want to run a mail function from scheduler. i made 
mail.py under the modules

from gluon.tools import Mail
    mail=Mail()
    mail.settings.server='smtp.gmail.com:587'
    mail.settings.login='[email protected]:aaaaaa'
    mail.settings.sender='[email protected]'
    mail.send(to=['[email protected],'],
    subject='aaaaaa',
    message='<html>'
'<body>'
                            'test mail'
                        '</body>'
                    '</html>')

my corntab file is



0-59/1  *  *  *  * root *applications/comv1/modules/mail1.py


scheduler.py file which under home > application name of pythonanywhwer 

#/usr/bin/env python
import os
import socket
import sys
import subprocess
filename = os.path.abspath(__file__)  # we use this to generate a unique 
socket name
try:
socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM).bind('\0' + filename)
except socket.error:
print("Failed to acquire lock, task must already be running")
sys.exit()
subprocess.call(["python", "web2py/web2py.py", "-K", "comv3"])



after this also i am not able to run cron job.....

can any one help me


-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to