[Erp5-dev] Scheduling a a script and some more queries
Vincent Pelletier
vincent at nexedi.com
Mon Dec 29 10:27:50 CET 2008
Hi.
Le Saturday 27 December 2008 19:31:02 Danny Admin, vous avez écrit :
> Thanks for your valuable answer.
Just one more thing about portal_alarms: it has a minute-level granularity
IIRC, so it won't fit a 5 second periodicity.
> 1. Can i use portal_activities for this? If yes then how i start an
> activity that will run at a particular time each day?
Basically, portal_activities is designed for one-shot execution. Of course,
you can make an activity create another one, making it periodic.
You can plan an alarm for execution at a future date by providing an "at_date"
parameter to "activate" method. Ex:
context.activate(at_date=DateTime("2009-01-01 00:00:00")).doSomething()
Note that it will only give a lower bound to its possible execution, it might
execute later. That imprecision depends on activity load (how many pending
activities, ...) and timerserver tic rate (set in your zope.conf, by default
it's one tic every 5 seconds).
For your other questions, I'm afraid don't know these areas well enough to
give an answer.
--
Vincent Pelletier
More information about the Erp5-dev
mailing list