create new tag
, view all tags


I am trying to set up WebNotify to allow users to subscribe to topics and be notified by email. If I run the mailnotify script manually from the command line it succeeds and I get a change notification email:

perl -I bin tools/mailnotify [web]

however, when trying to run this as a cron job by adding the following to /etc/crontab:

*/5 * * * root cd /usr/local/twiki && perl -I bin tools/mailnotify -q [web]

I get a confirmation that cron has executed the command in syslog (every 5 min) but no emails get through. I tried redirecting output by appending '> logfile' and removing '-q' from the command. In that case, the last line in logfile is:

"Found change to [topic]"

what is absent is:

"Notified [email address] of changes in [topic] 1 change notification from [topic]"

I am guessing this might have something to do with the way cron executes the command but it is strange that it partially succeeds. (Note: I did try executing the command manually as root user and it worked as expected)

Any thoughts?


TWiki version: 4.1.1
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Ubuntu Server 6.10, kernel 2.6.17.-11
Web server: Apache 2.2.4
Perl version: 5.8.8
Client OS: Windows XP
Web Browser: IE7
Categories: Plugins, Mail

-- EdwardLevin - 24 Mar 2007


ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Without knowing more about your server environment, I can say that your crontab entry looks strange to me. You should be able to use simply:
*/5 * * * perl -I /usr/local/twiki/bin /usr/local/twiki/tools/mailnotify -q [web]
My crontab entry specifies the full path like that and email delivery works. Give it a try.

-- JohnWorsley - 26 Apr 2007

Closing this after more than 30 days inactivity; re-open if needed...

-- PeterThoeny - 02 Jun 2007

Change status to:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2007-06-02 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.