Hey, I would like to create a background timer, and when it finishes I
would like web2py to do something.
I have tried numerous ways to do this, without succeeding. The closest one
to success looked like this:
1. import urllib; urllib.urlopen(url).read() # read url which is a php
script that calls a python script that sleeps
2. url is a php script that calls a python script that sleeps inside thread
3. the php script uses exec("/path/to/script.py &") which goes in the
background
4. when I access the php url from my browser the web server answers
instantly, which is why I thought it would succeed
5. when I access the php url from python/web2py however, as in the code
above, it waits until after the sleep, which causes a timeout
Note that web2py is using apache webserver in my case.
I have also tried to sleep inside a thread in web2py, calling the script
through a subprocess from web2py, but nothing has worked.
Is there any way to run a web2py command after a customly chosen time?
--
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/groups/opt_out.