Not sure why but cron never worked for me...
0-59/1 * * * * root *admin/test
def test():
mail.send('titogarr...@gmail.com','test','teste')
return 'test'
Nothing happens... I've tried locally and on webfaction...
What I am doing wrong?
Also how can I use external cron? I couln't fi
Hello
I have web2py installed with setup-web2py-ubuntu.sh
It runs with Apache mod_wsgi.
Crontab of myapp is:
*/1 * * * * root *cron/test
And function:
def test():
shop = db(db.shops.id==8).select().first()
new = shop.daystodelete + 1
shop.update_record(daystodelete=new)
db.c
Sverre, I think you must use your own application crontab, located at
applications/your_app/cron
I suggest you create a python script without any functions inside it,
to isolate your cron job, and put it in
applications/your_app/private/.
I do this here and it works nice.
Following my advice, you
My cron tab looking like this
#crontab
*/2 * * * * root *sys/test_cron
@hourly root *applications/mm/cron/expire_sessions.py
but this doesn' work. My test cron function is
from time import ctime
def test_cron():
db.dbg.insert(dbgmsg=ctime())
db.commit()
return "ready"
4 matches
Mail list logo