We need to schedule some tasks in Plone 4 (notify users after n days of inactivity, etc.). What is the best way to do it? Is there something in Plone or maybe an old cron job? I would like to avoid cron4plone.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simply use the built-in
<clock-server>functionality in zope.conf; list them in thezope-conf-additionaloption ofplone.recipe.zope2instance:The above snippet will call
/Plone/path/to/callableevery 2 hours, with the Host header set tolocalhostwith the configured user and password.The clock-server was added to Zope 2.10; before this it was a separate product by Chris McDonough. I generally created dedicated views for such tasks.
The alternative is to use a cron job to call either a view (usually with
wgetorcron) or a zopectl command line script. I use this when I need precise control over when the script needs to be executed, such as at midnight every day.