I hope one of you folks can help - I'm still a little green with web2py and python, but am trying to get the CRON to work to run a script in our application.
I've been scouring the web for examples, but wonder if our version is setup to utilize it.
Have also tried to run a script from the unix command-line with just web2py.py :
./web2py.py -S sms_test_protocol -R *applications/sms_test_protocol/test_cron_jfh/ins_err
Traceback (most recent call last):
File "./web2py.py", line 16, in ?
import gluon.widget
File "/home/ameteq/webapps/web2py/web2py/gluon/__init__.py", line 15, in ?
from globals import current
File "/home/ameteq/webapps/web2py/web2py/gluon/globals.py", line 21, in ?
from html import xmlescape, TABLE, TR, PRE, URL
File "/home/ameteq/webapps/web2py/web2py/gluon/html.py", line 30, in ?
from utils import web2py_uuid, hmac_hash
File "/home/ameteq/webapps/web2py/web2py/gluon/utils.py", line 12, in ?
import hashlib
ImportError: No module named hashlib
If you are familiar with this, can you point me in the right direction? I've tried several recommendadtions from the web, but so far, no luck.
If you can help, it would be greatly appreciated.
Thanks,
-jim
-jim
--
---
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
hi, you're mix/matching the available options.
First of all, if your system has an available cron, use that. web2py's cron is not as accurate as unix one.
If you want to leverage cron, at least read the section in the book that speaks of it
http://web2py.com/books/default/chapter/29/04#Cron
If you instead have a python script that needs to be run within the web2py environment of your app (so you can access db, etc etc etc), you can use with the "standard" cron this syntax
python web2py.py -M -S yourappname -R /path/to/scriptname.py
Remember that * and ** used before the command (like your example -R *applications/sms_test_protocol/test_cron_jfh ) are only available in web2py's cron (they are shortcuts to enable -S and -M respectively).
--
---
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/-aKve0DnTbg/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
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/-aKve0DnTbg/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.