Re: Repetitive background tasks

2006-06-27 Thread Harish Mallipeddi
Thanks everyone for the replies. Anyways I looked at the kronos scheduler (pointed out by Canen above) being used in Turbogears and what I wanted is more like this. So currently the way I'm using this is to put kronos.py into the django utils directory and then importing it from there. In a part

Re: Repetitive background tasks

2006-06-27 Thread canen
You could use kronos.py, found here http://snakelets.cvs.sourceforge.net/snakelets/Plugins/scheduler/kronos.py?view=markup turbogears uses it for its scheduler. You can find the tg implementation here http://trac.turbogears.org/turbogears/browser/branches/1.0/turbogears/scheduler.py?rev=1363 --~

Re: Repetitive background tasks

2006-06-27 Thread Jay Parlar
On 6/27/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Mon, 2006-06-26 at 13:28 -0700, Tyson Tate wrote: > > I've found a better solution with signals and the dispatcher. The > > essence is that you raise a signal every time someone views the > > relevant page, for instance, a "Recent Fl

Re: Repetitive background tasks

2006-06-27 Thread Malcolm Tredinnick
On Mon, 2006-06-26 at 13:28 -0700, Tyson Tate wrote: > > On Jun 26, 2006, at 12:43 PM, Glenn Tenney wrote: > > > > [...] > > 2) Also within your application, write a global function that (a) > > immediately checks to see if it's the first time it's invoked each day > > (or whatever interval), and

Re: Repetitive background tasks

2006-06-26 Thread Aaron
Embrace the OS. Whats wrong with OS specific tools anyway? If you are developing on windows and deploying to unix then you can use something like cygwin to get cron in there. When I code in java I use the excellent quartz scheduler, but then I have to use my home-gronw monitoring tools to ensur

Re: Repetitive background tasks

2006-06-26 Thread Tyson Tate
On Jun 26, 2006, at 12:43 PM, Glenn Tenney wrote: > > [...] > 2) Also within your application, write a global function that (a) > immediately checks to see if it's the first time it's invoked each day > (or whatever interval), and then, if it is the first time, (b) does > all of the repetitive ta

Re: Repetitive background tasks

2006-06-26 Thread Glenn Tenney
On Mon, Jun 26, 2006 at 06:07:19PM -, Harish Mallipeddi wrote: > Is there a way to do this by resorting to a solution within the django > framework and not some OS-level solution like cron jobs on Linux? As has been mentioned, using cron (or cron-like) to schedule running a Python script is

Re: Repetitive background tasks

2006-06-26 Thread Joseph Heck
It really depends on how you're running your instance of Django...If you are using mod-python, then you have the central, single process of python that you *could* take advantage of and run a thread from. Perhaps not ideal, and a a complete PITA to debug, but available. If you're running Django wit

Re: Repetitive background tasks

2006-06-26 Thread Simon Willison
On 26 Jun 2006, at 19:07, Harish Mallipeddi wrote: > I'm wondering if someone could advise me on how to do certain periodic > background tasks with django? For instance, if I needed to retrieve a > list of RSS feeds daily to check for updates how would I do that? > > Is there a way to do this by

Repetitive background tasks

2006-06-26 Thread Harish Mallipeddi
Hi all, I'm wondering if someone could advise me on how to do certain periodic background tasks with django? For instance, if I needed to retrieve a list of RSS feeds daily to check for updates how would I do that? Is there a way to do this by resorting to a solution within the django framework