f0y / due_date_reminder

Redmine plugin that sends notifications
Other
30 stars 42 forks source link

Mails are not sent by the cron job #22

Closed Guite closed 11 years ago

Guite commented 11 years ago

Hi,

if I change into my redmine directory and call:

bundle exec rake redmine:reminder_plugin:send_notifications RAILS_ENV=production

then the email is sent correctly.

But when using the cronjob it does not work.

0 5 * * * RedmineUser cd /var/.../redmine/redmine; rake redmine:redminder_plugin:send_notifications RAILS_ENV="production" &> /tmp/redmine_due_date_reminder.log

Any idea what we can try to find out the problem cause?

assist-software commented 11 years ago

Check the errors from /tmp/redmine_due_date_reminder.log

I had to add path to bins

Guite commented 11 years ago

Fixed by changing the syntax to:

0 5 * * * RedmineUser cd /var/.../redmine/redmine; rake redmine:send_reminders RAILS_ENV="production"

The actual task name (send_reminders) I found with rake -T.

f0y commented 11 years ago

rake redmine:send_reminders is not plugin task. It's built in redmine functionality.

Cron job does not work because of misprint in word reminder in command rake redmine:redminder_plugin:send_notifications.

Guite commented 11 years ago

Thanks for bringing this up! :+1:

Guite commented 11 years ago

Works! Thanks again.

matbott commented 10 years ago

I have the same problem. my cron line: cd / opt / bitnami / apps / htdocs; rake redmine: send_reminders RAILS_ENV = "production"

Log cron: rake redmine: send_reminders RAILS_ENV = "production") November 8 11:21:01 linux CRON [32050]: (root) MAIL (mailed 1 byte of output, but got status 0x004b, # 012)

Any suggestions?