[Zope] Xron Problem

Maik Jablonski maik.jablonski@uni-bielefeld.de
Thu, 08 Aug 2002 09:54:54 +0200


hi,

my experiences with XRON are bad, so I won't use XRON in a 
production-environment again. It doesn't work reliable and can crash 
your ZOPE [sometimes it ran crazy and loaded my system to 100%. 
Restarting ZOPE did not help, only removing the XRON-Product]. Redesign 
your problem and use a simple os-cron-job calling your script regularly 
with Client.py / curl / wget etc. instead.

cheers, maik

George Stroussopoulos wrote:
> Hi. I have been using Xron 0.0.10 inside  Zope 251. I have a problem in 
> xrondtml method. It seems that when i schedule a xron event to run at a 
> specific time, it runs  but it fails to reschedule itself  for the next 
> run. It always fails to rescedule and disarms the xron (time goes to 
> 1970 [datetime(0) not in eventtime + reschedule interval] [the method i 
> call with xron runs correctly]. I use xron in several parts of my code.
> 
> It works fine in a part of code [it manages correctly to reschedule 
> itself] but when i am trying to trigger it manually i get the message to 
> download it.In other part of code it works only manually an not in the 
> background procedure. Below is a part of the code to help you:  I use 
> xron inside a class called AllChannelsFolder. In the init method i 
> wrote: def __init__(self, id, title, description,proxy_server_url, 
> theContainer):         """ Acquire the parent properties """ self = 
> self.__of__(theContainer) self.id = id self.title = title 
> self.description = description self.proxy_server_url = proxy_server_url 
> self.discoveryExecuteAt=DateTime()+1.0 # initial value is tomorrow 
> self.discoveryPeriodDays=0.0
>         #Initialise the periodic discovery event 
> newEventId=id+'_XronDTMLMethod' newEventTitle=title+' Discovery method 
> (using Xron)' discoverFile='<dtml-call 
> expr="this().findAllChannels(REQUEST)">' 
> newEvent=XronDTMLMethod(newEventId, newEventTitle, discoverFile, 
> self.discoveryExecuteAt, self.discoveryPeriodDays) 
> self._setObject(newEventId, newEvent) 
> self.discoverXronDTMLMethod=newEvent         Inside the findAllChannels 
> method that xron calls :          ... in the end of code i have 
> this:         if REQUEST is not None: try: u=self.absolute_url() except: 
> # Log the catched exception # logExc(__name__, TRACE, 
> MSG_URL_COMPUTING_EXC) if rfind(REQUEST['URL']) == -1: # We are in the 
> manage_trigger() or in the trigger() method of the Xron contained object 
> # Redirect to portal URL, i.e. URL2 u=REQUEST['URL2'] else: # We were 
> called from the Discover tab => use URL1 for redirection 
> u=REQUEST['URL1'] u2=u+'/manage_workspace' REQUEST.RESPONSE.redirect(u2) 
> return self.loadingError  The above code works fine when i schedule it, 
> but it does not work with the manually way[trigger].   In the following 
> code i use xron in a class named PortalFolder:  the init method is 
> basiclly the same: def __init__(self, id, title, 
> description,theContainer, proxy_server_url=''): """ Constructor """ self 
> = self.__of__(theContainer) self.id = id self.title = title 
> self.description = description self.discoveryExecuteAt=DateTime()+1.0 # 
> initial value is tomorrow self.discoveryPeriodDays=0.0
>         # Initialise the periodic discovery event 
> newEventId=id+'_XronDTMLMethod' newEventTitle=title+' Discovery method 
> (using Xron)' discoverFile='<dtml-call expr="this().discover(REQUEST)">' 
> newEvent=XronDTMLMethod(newEventId, newEventTitle, discoverFile, 
> self.discoveryExecuteAt, self.discoveryPeriodDays) 
> self._setObject(newEventId, newEvent) 
> self.discoverXronDTMLMethod=newEvent 
> self.proxy_server_url=proxy_server_url      the discover method that 
> xron calls has in the end i have:        if REQUEST is not 
> None:             try: u=self.absolute_url() except: #u=REQUEST['URL1'] 
> logExc(__name__, TRACE, MSG_URL_COMPUTING_EXC) if rfind(REQUEST['URL']) 
> == -1:      u=REQUEST['URL2'] else:      u=REQUEST['URL1'] 
> u2=u+'/manage_workspace'
> REQUEST.RESPONSE.redirect(u2) return theResult
> The method discover runs ok but xron now fails to reschedule itself. It 
> throws this : 2002-08-06T07:20:42 PROBLEM(100) Products.Xron.Loggerr 
> Trigger event: 
> http://exterminator:8082/Tests/CPM_V2/Portals/Portals_XronDTMLMethod 
> Trigger time: 2002/08/06 10:20:40 GMT+3 Failed to trigger event. 
> Type=bci.ServerError Val=302 (File: Unknown Line: Unknown) 302 Moved 
> Temporarily for 
> http://exterminator:8082/Tests/CPM_V2/Portals/Portals_XronDTMLMethod/trigger 
> 
> ------
> 2002-08-06T07:20:42 PROBLEM(100) Products.Xron.Loggerr Disarmed event
> 
> 
> [Note: I have setup permissions with proxy roles.]
> 
> 
> Can anyone help me?
> Am i missing something?
> Any help and suggestion could be usefull!
> I hope i made clear myself.
> 
> Thanks in advance.