I&#39;m guessing that AJ&#39;s solution is the best to implement. <br><br>What I did to solve this problem is simply create a few crons on the server that each do a mechanize (<a href="http://wwwsearch.sourceforge.net/mechanize/">http://wwwsearch.sourceforge.net/mechanize/</a>) http call to a specific location in Zope which basically acts as a private API: when called, it executes a function that triggers whatever needs to happen. I hard-coded a check that the source IP must be the specific internal address of the server Zope runs on. That way I know that the functions can&#39;t be called from the outside.<br>
<br>Not the best solution, and I wouldn&#39;t really recommend it to someone else, but it&#39;s easy and it works for me.<br><br>- Thibaud<br><br><div class="gmail_quote">On Mon, Feb 16, 2009 at 12:50 PM, Thierry Florac <span dir="ltr">&lt;<a href="mailto:thierry.florac@onf.fr">thierry.florac@onf.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Le lundi 16 février 2009 à 16:59 +0100, Marco Bizzarri a écrit :<br>
<div class="Ih2E3d">&gt; Hi all.<br>
&gt;<br>
&gt; A little of background, before.<br>
&gt;<br>
&gt; I need to run some tasks, inside a zope environment, in a periodic<br>
&gt; way. Even though I could resort to using cron and wget, I do not like<br>
&gt; the solution too much, also because it requires me to rely on<br>
&gt; something completly external to the application to schedule the task<br>
&gt; itsel (I need to update the cron to change how often a job is run...<br>
&gt; ).<br>
&gt;<br>
&gt;<br>
&gt; Now, I can see I can run a task using zopectl run + a script. My<br>
&gt; script would therefore be something like:<br>
&gt;<br>
&gt; while True:<br>
&gt; &nbsp; &nbsp; &nbsp;do something<br>
&gt; &nbsp; &nbsp; &nbsp;sleep(for sometime)<br>
&gt;<br>
&gt;<br>
&gt; of course, there are dozen of ways to write this in a better way, but<br>
&gt; that is not the problem. My problem is understanding if it is possible<br>
&gt; to run such a script via the zdaemon. Can anyone shred some light on<br>
&gt; this topic?<br>
<br>
<br>
</div>Hi,<br>
<br>
I don&#39;t know if it&#39;s the best way, but I&#39;ve implemented a &quot;cron like&quot;<br>
task base class for my Zope-2.9 instance, which :<br>
&nbsp;- is thread based<br>
&nbsp;- can launch operations in a &quot;cron like&quot; way<br>
&nbsp;- can act as the user of your choice.<br>
<br>
It doesn&#39;t actually provide any user interface to define task<br>
scheduling, but the main base class could probably be used as a good<br>
starting point ; at least, it works ;-).<br>
I can send you the source code on request...<br>
<br>
<br>
 &nbsp;Thierry Florac<br>
<font color="#888888">--<br>
 &nbsp;Chef de projet intranet/internet<br>
 &nbsp;Office National des Forêts - Département Informatique<br>
 &nbsp;2, Avenue de Saint-Mandé<br>
 &nbsp;75570 PARIS Cedex 12<br>
 &nbsp;Mél : <a href="mailto:thierry.florac@onf.fr">thierry.florac@onf.fr</a><br>
 &nbsp;Tél. : +33 01.40.19.59.64<br>
 &nbsp;Fax. : +33 01.40.19.59.85<br>
</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
Zope maillist &nbsp;- &nbsp;<a href="mailto:Zope@zope.org">Zope@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">http://mail.zope.org/mailman/listinfo/zope</a><br>
** &nbsp; No cross posts or HTML encoding! &nbsp;**<br>
(Related lists -<br>
&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
&nbsp;<a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
</div></div></blockquote></div><br>