Setting up cron on Linux to send out delayed notifications
02 Feb 2008
By default the IssueTrackerProduct sends out notifications as soon as they're created. By delaying that you can avoid sending out notifications to people who don't need them.
Version requirement:
Your mileage will vary if you're not using a "standard Linux" or a Windows server but the idea is the same for all.
First of all you need to disable "Dispatch on submit" in the Advanced Properties tab of your issuetracker as seen in this picture.
Secondly you need to decide how often notifications should be sent out. If you make this too low the whole point is lost. 1 minute would be too low. If you make it too high, the notifications delay might damage the productivity of the work on the issues. 60 minutes would be too high. Recommended value is 15 minutes. What this means is that when triggered it won't send notifications that are "younger" than 15 minutes.
If your issuetracker is set up with ID my-tracker the URL to hit with the cronjob is http://localhost:8080/my-tracker/dispatcher?min_age_minutes=15
Notice how the min_age_minutes=15 hints to the issuetracker how often you run your cron job.
Now to add the cron job use crontab -e on the command line and when the editor opens enter:
*/15 * * * * wget -q http://localhost:8080/my-tracker/dispatcher?min_age_minutes=15 > /dev/null
Exit and the cron job should be installed. If your issuetracker is disabled for anonymous access you can enter it like this instead::
/15 * wget -q --http-user=admin --http-password=secret \ http://localhost:8080/my-tracker/dispatcher?min_age_minutes=15 > /dev/null
And that's it! Leave it running for a while then assert yourself that it has worked by taking a quick peek at the log file:
$ cd /var/lib/zope-instance/log $ less Z2.log | grep dispatcher | tail
This news item explains what this is good for and what advantages it brings.