Error crontab witch Redmine-Bitnami
Added by Matias Fusaro over 8 years ago
I have installed Redmine with Bitnami, to set up a task crontab (bundle exec rake redmine: send_reminders days = 7 RAILS_ENV = "production") returns me the following error "No MTA installed, discarding output".
If I run the line in console it works properly.
any suggestions
Thank
Replies (3)
RE: Error crontab witch Redmine-Bitnami - Added by Haihan Ji over 8 years ago
ubuntu?
that means error log would not be logged in crond.log, it will mail to you.
do you check mail
?
RE: Error crontab witch Redmine-Bitnami - Added by Hide MATSUTANI over 8 years ago
I think this is a typical issue that many people encounter.
It happens because environment variables aren't set in crontab job whereas you have set some environment variables in your console shell.
Please google "cron environment variables" and you'll get some sollutions.
RE: Error crontab witch Redmine-Bitnami - Added by Matias Fusaro over 8 years ago
Resolved it
https://community.bitnami.com/t/cron-for-receive-imap/39060
I have solved my problem.
I have create an sh file with this:
#!/bin/sh
. /opt/bitnami/scripts/setenv.sh
cd /opt/bitnami/apps/redmine/htdocs
bin/rake -f /opt/bitnami/apps/redmine/htdocs/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com port=993 ssl=1 username=****@gmail.com password=**** project=prova tracker=errore allow_override=tracker,priority unknown_user=accept no_permission_check=1 --trace
and i have saved this file as /opt/bitnami/apps/redmine/mail.sh
change permission on file with user bitnami and 755
edit sudo crontab
with this:
*/2 * * * * "/opt/bitnami/apps/redmine/mail.sh" > /opt/bitnami/apps/redmine/mail.log 2>&1