Cron webnotify and mailercontrib on Ubuntu server

For Fosiki Debian packages (http://foswiki.org/Extensions/DebianPackage) on Ubuntu server, the cron example at MailerContrib did not work.

To get a working cronjob add the following line to /etc/crontab:

0 0 * * * www-data perl -I /var/lib/foswiki/bin /var/lib/foswiki/tools/mailnotify

Ensure that there is a newline character at the end of the line and that the last line in the crontab file is a blank line. The above line will send out notifications at 00:00 every day to those users that have subscribed to topics/webs.

I will try to move the above line to /etc/cron.d dir (create a blank file in the dir) as I understand etc/crontab shouldn't really be used for this. This may not work however, as I read that cron works slightly differently depending on how it's set up and may not be able to force it to run as another user... in this case the web server user www-data.

See MailerContrib for more help. Note: the cron examples on the page are misleading and didn't work on my installation. e.g.
0 0 * * * cd /usr/local/foswiki && perl -I bin tools/mailnotify -user AdminUser -q Public Private

The above suggests that changes to Public and Private named webs will be sent out, but is -user a web or AdminUser? Is AdminUser a special user or the name of a user with admin rights? I couldn't get it to work no matter what I tried.

-- TimHandy - 16 Jul 2011

Support.FAQForm edit

TopicClassification FrequentlyAskedQuestion
Subject Email and Notifications, Operating system, Setup
Topic Summary How to enable cron for email notifications on Ubuntu server
Extension MailerContrib
Interested Parties
Related Topics Tasks.Item10976
Topic revision: r3 - 27 Dec 2011, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy