-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Eric Bréhault wrote:
yes indeed you can easily extract the mechanism to create a specific security manager and create a request to call the method you want using this security manager
the problem with ZEO is not related to this aspect so it should work fine
eric
On Wed, Jul 23, 2008 at 11:05 AM, Thierry Florac <thierry.florac@onf.fr> wrote:
Le mardi 22 juillet 2008 à 19:43 +0200, Eric Bréhault a écrit :
Hello Thierry,
To schedule cron-like tasks on Zope, I use ZpCron: http://www.zope.org/Members/janik/ZpCron
It works pretty fine (well, as far as you do not use ZEO) and it allows to define the user you want to use to run such or such task, and the Zope security mechanisms are applied just like if the user had run the task himself.
Note that you can write scripts designed to use the ZODB, but be run from a crontab. E.g.: $ cat Products/foo/scripts/send_report.py mailnost = app.site.MailHost catalog = app.site.portal_catalog() .... $ crontab -l 55 0 * * * /home/tseaver/instance/bin/zopectl run \ #(no linebreak!) /home/tseaver/instance/Products/foo/scripts/send_report.py You can *only* use this approach if you use ZEO, of course. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIh06c+gerLs4ltQ4RAuJAAKCWoSwiWxmtxqszfwPK6o4c5EKPSACgitdD yqCYwcEekqscJM3bwl1sUiQ= =boKO -----END PGP SIGNATURE-----