docker-redmine
docker-redmine copied to clipboard
Implement reminder mails
Related to https://www.redmine.org/projects/redmine/wiki/RedmineReminderEmails I wish, reminder functionality would be implemented. Hopefully it isn't a big deal :)
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.
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
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.
Thanks for the tip! I'll definitely do that!
Yeah something similar is mentioned in the install plugins section. https://github.com/sameersbn/docker-redmine?tab=readme-ov-file#installing-plugins