cron job to fetch emails (imap) in docker container

Added by carlo m 4 months ago

Hi all,

I have started working with Redmine few weeks ago and I find it great!

Now I'd like to schedule fetching emails via imap.
I am able to fetch emails manually, via putty, and now I'd like to automate the process but I am stuck.

I've read I need to create a cron job but I don't know how to make it work in docker.

What I do manually using putty:

docker exec -it myredminecontainer bash

and then
rake redmine:email:receive_imap host=myhost port=993 ssl=1 username=myusername password=mypassword RAILS_ENV=production

And it works.

How can I make it work with cron?
Or in another way if it works.

Thank you for your support.