[Zope] Xron TypeError revisited

Dwayne Morrison dcmorrison@tidewater.net
Mon, 11 Sep 2000 23:38:09 -0400


Hello,

I posted earlier about Xron 0.0.9 event scheduling woes.  One of my stabs 
in the dark seems to work. I removed the 'this()' parameter entirely and 
now am able to schedule events via DTML. I also had to add the 'US/Eastern' 
parameter to the DateTime call to get a current value for DateTime.  It was 
returning 12/31/1969.

Xron documentation (works on Zope 2.1.3):

<dtml-with "manage_addProduct['Xron']">
   <dtml-call expr="manage_addXronDTMLMethod(
     this(),
     'SchedMethodId1',
     'Scheduled Method 1 Title',
     file = 'Content-Type: text/plain\n\nBANG!!!',
     executeAt = _.DateTime()+14
   )">
</dtml-with>


Here's what works for me on 2.2.0:

<dtml-with "manage_addProduct['Xron']">
   <dtml-call expr="manage_addXronDTMLMethod(
     'SchedMethodId1',
     'Scheduled Method 1 Title',
     file = 'Content-Type: text/plain\n\nBANG!!!',
     executeAt = _.DateTime('US/Eastern')+14
   )">
</dtml-with>


I'd appreciate any insight as to why this works without the 'this()' 
parameter in 2.2.0.

Thanks,

Dwayne Morrison
dcmorrison@tidewater.net