4

Javan's Whenever gem for Ruby on Rails is fantastic, however, I'm having one issue with it, namely that it sends whatever output I've logged to /var/mail/user, which I don't want to receive. Does anyone know how to turn this off?

Thanks,

Harris

lightyrs
  • 2,809
  • 2
  • 29
  • 32

2 Answers2

3

Set

env :MAILTO, ""

http://groups.google.com/group/whenever-gem/browse_thread/thread/4eed7957127a72d4

jemminger
  • 5,133
  • 4
  • 26
  • 47
  • This generates an error: `errors in crontab file, can't install` Maybe `set :environment, "development"` ? I'm on Rails 3 btw. – lightyrs Feb 09 '11 at 03:30
  • That's proper syntax according to their documentation: https://github.com/javan/whenever/wiki/instructions-and-examples Perhaps hit up their google group for help. – jemminger Feb 09 '11 at 03:37
3

Whenever allows also to direct standard output and errors differently, for example to /dev/null if you don't want any mail or logging. For details, see: https://github.com/javan/whenever/wiki/Output-redirection-aka-logging-your-cron-jobs

Gnomet
  • 966
  • 10
  • 12