[Zope] Scheduled Event Problem
John J Shockro
John_J_Shockro at raytheon.com
Thu Nov 20 09:08:33 EST 2003
I am trying to run an internal Python script at scheduled times by using
the product Xron. I have tried a number of ways with no luck to call this
script through
the DTML Method associated with Xron. I can make the call if I use the
trigger tab
in the management interface. Anyone help with what I am doing wrong?
Zope 2.6.1
Python 2.1.3
windows 2000
John
If I use:
<dtml-with foo>
<dtml-call expr="amailprocess()">
</dtml-with>
NOTE: foo is the folder that contains the script
I get:
File "C:\PROGRA~1\zope1\lib\python\Products\Xron\XronDTMLMethod.py", line
141, in trigger
REQUEST=REQUEST, RESPONSE=RESPONSE, kw=kw)
File "C:\PROGRA~1\zope1\lib\python\OFS\DTMLMethod.py", line 126, in
__call__
r=apply(HTML.__call__, (self, client, REQUEST), kw)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_String.py", line
474, in __call__
try: result = render_blocks(self._v_blocks, md)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_With.py", line 76,
in render
try: return render_blocks(self.section, md)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_Util.py", line
195, in eval
d[name] = md.getitem(name, 0)
Unauthorized: You are not allowed to access amailprocess in this context
************************************
If I use:
<dtml-with foo>
<dtml-call expr="container.amailprocess()">
</dtml-with>
I get:
File "C:\PROGRA~1\zope1\lib\python\Products\Xron\XronDTMLMethod.py", line
141, in trigger
REQUEST=REQUEST, RESPONSE=RESPONSE, kw=kw)
File "C:\PROGRA~1\zope1\lib\python\OFS\DTMLMethod.py", line 126, in
__call__
r=apply(HTML.__call__, (self, client, REQUEST), kw)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_String.py", line
474, in __call__
try: result = render_blocks(self._v_blocks, md)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_With.py", line 76,
in render
try: return render_blocks(self.section, md)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_Util.py", line
201, in eval
return eval(code, d)
File "<string>", line 2, in f
NameError: global name 'container' is not defined
*****************************
If I use:
<dtml-with foo>
<dtml-call expr="context.amailprocess()">
</dtml-with>
I get:
File "C:\PROGRA~1\zope1\lib\python\Products\Xron\XronDTMLMethod.py", line
141, in trigger
REQUEST=REQUEST, RESPONSE=RESPONSE, kw=kw)
File "C:\PROGRA~1\zope1\lib\python\OFS\DTMLMethod.py", line 126, in
__call__
r=apply(HTML.__call__, (self, client, REQUEST), kw)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_String.py", line
474, in __call__
try: result = render_blocks(self._v_blocks, md)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_With.py", line 76,
in render
try: return render_blocks(self.section, md)
File "C:\PROGRA~1\zope1\lib\python\DocumentTemplate\DT_Util.py", line
201, in eval
return eval(code, d)
File "<string>", line 2, in f
NameError: global name 'context' is not defined
More information about the Zope
mailing list