RedmineReminderEmails » History » Version 11

Jürgen Depicker, 2015-06-01 12:16
added brief cron instructions since this caused some headache to me to get fixed.

1 1 Jean-Philippe Lang
h1. Sending reminder emails
2 1 Jean-Philippe Lang
3 10 Matt Wiseley
Redmine offers a rake task that sends reminder emails about assigned and active issues that are past due or due in the next specified number of days.
4 1 Jean-Philippe Lang
5 1 Jean-Philippe Lang
Available options:
6 4 Mischa The Evil
7 4 Mischa The Evil
* days: number of days to remind about (defaults to 7)
8 4 Mischa The Evil
* tracker: id of tracker (defaults to all trackers)
9 4 Mischa The Evil
* project: id or identifier of project (defaults to all projects)
10 4 Mischa The Evil
* users: comma separated list of user ids who should be reminded
11 4 Mischa The Evil
12 10 Matt Wiseley
The following example will send an email to each user who has assigned issues that are past due or due in the next 7 days:
13 4 Mischa The Evil
14 4 Mischa The Evil
  rake redmine:send_reminders days=7 RAILS_ENV="production"
15 4 Mischa The Evil
16 10 Matt Wiseley
The following example will send an email to users *1*, *23*, and *56* who have assigned issues that are past due or due in the next *7 days*:
17 4 Mischa The Evil
18 6 Denis Savitskiy
  rake redmine:send_reminders days=7 users="1,23,56" RAILS_ENV="production"
19 11 Jürgen Depicker
20 11 Jürgen Depicker
When adding this to your crontab, add the rake command to a small script and make sure to add the full path to the rake command (since the path is unknown when executed through cron); eg:
21 11 Jürgen Depicker
<pre>
22 11 Jürgen Depicker
#!/bin/bash
23 11 Jürgen Depicker
cd /usr/local/share/redmine
24 11 Jürgen Depicker
/usr/local/bin/rake redmine:send_reminders days=7 RAILS_ENV="production"
25 11 Jürgen Depicker
</pre>