docker-redmine icon indicating copy to clipboard operation
docker-redmine copied to clipboard

Implement reminder mails

Open prodigy7 opened this issue 5 years ago • 1 comments

Related to https://www.redmine.org/projects/redmine/wiki/RedmineReminderEmails I wish, reminder functionality would be implemented. Hopefully it isn't a big deal :)

prodigy7 avatar May 22 '19 14:05 prodigy7

Sorry for the late reply. This feature seems like a mess. A lot of these settings should have been configurable in the website instead of requiring the cronjob to be changed everytime a new user is added....

It doesn't seem like it would be too hard to add some ENV variables to enable and configure a cronjob. Similar to how the email ones work. However, I don't have the time to implement and test it.

Feel free to submit a pull request. Or you could create a plugins/post-install.sh file to create the cron job. See the https://github.com/sameersbn/docker-redmine#installing-plugins section for example.

jcormier avatar Jun 03 '19 17:06 jcormier

I'm using it by doing docker exec -i <container-id-or-name> sudo -u redmine -H bundle exec rake redmine:send_reminders days=7 RAILS_ENV="production"

I'm currently using docker-compose.yml but instructions shouldn't differ. Your process should have a name (either --name=redmine or container_name: redmine for compose and your SMTP settings must work, meaning you should be receiving emails from redmine before trying to receive reminders

Here's what I did (using linux)

Created an executable file called send_reminder_email.sh

#!/bin/sh

docker exec -i redmine sudo -u redmine -H bundle exec rake redmine:send_reminders days=7 RAILS_ENV="production"

Added a task to crontab (plus an extra log output)

0 9 * * * root /path/to/script/send_reminder_email.sh >> /path/to/script/logs/cron.log 2>&1

EDIT: Damn I'm necro'ing this issue. sorry. I hope it's useful for someone who reach this

marcosguedes avatar Jan 30 '24 11:01 marcosguedes

Yup though your solution is decent. I'd normally create the cronjob inside the container using the plugins/post-install.sh script but I've definitely made scripts similar to yours to call from the host.

Closing this issue.

jcormier avatar Jan 30 '24 15:01 jcormier

Thanks for the tip! I'll definitely do that!

marcosguedes avatar Jan 30 '24 15:01 marcosguedes

Yeah something similar is mentioned in the install plugins section. https://github.com/sameersbn/docker-redmine?tab=readme-ov-file#installing-plugins

jcormier avatar Jan 30 '24 15:01 jcormier