[Zope] Trying to understand the Scheduler

Pedro Vale Lima eq3pvl@eq.uc.pt
Mon, 22 Mar 1999 19:45:09 +0000


Zope is great. It's so great that I guess I'm trying to use it for doing
something different from what zope it's expected to do. I want to make
some SQL scripts to access different databases and collect the data in a
new table. That I can do with the following external method that calls
see_data and put_data ZSQLMethods

def get_data(self):
    result = self.see_data()
    self.put_data(value=result._data[0][1])
    return None  

Then I wish to make this kind of data management automatic every hour. I
dug in the sources and I found out the Scheduler class, which I think is
what I need (is it?). But I'm having some trouble using it. This was the
external method I tried (without success).

def eventGetData(self):
    rev = RegularEvent(get_data,(),interval=60)
    self.schedule(rev)
    return(None)      

It seems that RegularEvent is not available. Besides, is schedule
available trough acquisition in the folder? 

Can someone give me some light on this. I don't even know if it's
possible to use the Scheduler with external methods so it would be great
at least to know I'm in the right path.

Thanks

--
Pedro Vale Lima
eq3pvl@eq.uc.pt