Re-occuring jobs

1 view
Skip to first unread message

voltron

unread,
Sep 24, 2008, 8:07:02 AM9/24/08
to web2py Web Framework
How would one go about creating a re-occuring job Massimo? I want to
insert 1 record in a certain table automatically evvery day. I do not
want to use a crpn job to do this. Do you have any suggestions?


Thanks

achipa

unread,
Sep 24, 2008, 8:12:49 AM9/24/08
to web2py Web Framework
See the 'old sessions...' thread, the method I outlined there is good
for such tasks as well.

voltron

unread,
Sep 24, 2008, 8:23:24 AM9/24/08
to web2py Web Framework
You happen to have some working code for me Achipa? I read up on
"sched", this is what Im saw:


To support multi-threaded applications, the delay function is called
with argument 0 after each event is generated, to ensure that other
threads also have a chance to run.

achipa

unread,
Sep 24, 2008, 8:58:11 AM9/24/08
to web2py Web Framework
No code yet, waiting for Massimo's opinion on that.

I'm not too keen on using sched, because FWICS that means you should
start a new thread within web2py, start sched.run() in the thread,
which then sleeps there until the desired event occurs. This is OK if
you use web2py directly or through mod_proxy but... How would this
setup handle, say, two WSGI web2py processes ? Running a cron task
twice can cause quite a bit of trouble, and synching processes that
get restarted on the webserver's whim is not that simple. Also, the
web requests would have no guarantee of execution until your cron task
finishes which can be an issue for some long-running cron tasks. The 0
argument only gives chances to other threads between to event calls,
not during the execution of the event itself. So, for hard/exact
timing cron, I'm still not sure what's the ideal cross-platform,
execution environment independent mechanism for this.

voltron

unread,
Sep 24, 2008, 9:16:04 AM9/24/08
to web2py Web Framework
Wow, I did not kow that it was as complicated as that. Thanks for the
heads up Achipa

Timbo

unread,
Sep 24, 2008, 12:17:23 PM9/24/08
to web2py Web Framework
Voltron, basically, you want to use cron. Such a scheduler is outside
the scope of a web framework (and rightfully should be).

Massimo Di Pierro

unread,
Nov 26, 2008, 8:29:41 AM11/26/08
to web...@googlegroups.com
In which country are you?

Massimo

Tito Garrido

unread,
Nov 26, 2008, 8:17:36 PM11/26/08
to web...@googlegroups.com
Brazil :)


On Wed, Nov 26, 2008 at 10:29 AM, Massimo Di Pierro <mdip...@cs.depaul.edu> wrote:

In which country are you?

Massimo





--
Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

Zoom.Quiet

unread,
Nov 26, 2008, 8:31:24 PM11/26/08
to web...@googlegroups.com
China 中国
;-)

2008/11/26 Massimo Di Pierro <mdip...@cs.depaul.edu>:


>
> In which country are you?
>
> Massimo
>

--
http://zoomquiet.org'''
过程改进乃是催生可促生靠谱的人的组织!
PE keeps evolving organizations which promoting people be good!'''
[HR]金山软件常年招聘大量Py/C++人才!
https://groups.google.com/group/python-cn/web/ot-py-c
简历直投俺就好;-)

Phyo Arkar

unread,
Nov 27, 2008, 11:43:53 AM11/27/08
to web...@googlegroups.com
Myanmar (Burma)
Message has been deleted

Alfonso de la Guarda

unread,
Nov 27, 2008, 12:52:42 PM11/27/08
to web...@googlegroups.com
Peru

Saludos,

--------------------------------
Alfonso de la Guarda
1024D/B23B24A4
5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4

COS
www.cosperu.com
alfonsodg.blogspot.com
alfonsodg.wordpress.com
Telef. 997550914

Phyo Arkar

unread,
Dec 1, 2008, 1:20:49 PM12/1/08
to web...@googlegroups.com

Dear Massimo;

I was been busy and out of touch from web2py (i have to do java :( which i am playing with to make an applet for a project for a CCTV camera) But On Server side it will be python + web2py! :)

Damn , wish i can get this project done quick! i want to release Web2py OS fast.

Ah! thats cool :D

Glad that you know Myanmar and did an UN website about it too. Our country is isolated from the world and rarely anyone knows :D.



mdipierro

unread,
Dec 1, 2008, 1:56:17 PM12/1/08
to web2py Web Framework
I did not state it quite right. I did a Content Management System for
the UN in Django (www2.un.int). Myanmar among other nations used. I
did not work for any specific government and did not deal with
content. The idea was to provide a way so that every nation at the UN
would have a web presence (if they so wanted). This year they (the UN)
decided to move away from Django and use a commercial system (Jahia)
for all their needs.

Massimo

Yarko Tymciurak

unread,
Dec 1, 2008, 2:18:01 PM12/1/08
to web...@googlegroups.com
Ugh!   Jahia ==>  Java CMS!!!!

There is an open source (community) and a commercial version....

Phyo Arkar

unread,
Dec 1, 2008, 2:56:47 PM12/1/08
to web...@googlegroups.com
JAVA CMS .. OMG ...
Reply all
Reply to author
Forward
0 new messages