title: Redmine Cron Job Issue
body: <p>I must set a Cron Job on Redmine to automatically manage IMAP fetching. I try to supply as many infos as I can about my environment:</p>
  
  <pre><code>Redmine version               3.2.0.stable
  Ruby version                  2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                 4.2.5
  Environment                   production
  Database adapter              Mysql2
  </code></pre>
  
  <p>I have installed <code>luismaia/redmine_email_fetcher</code> as a plugin, and I have configured it for gmail IMAP. Up to this point I had no error messages and, by trying a test tool on Redmine, I get a success message.  </p>
  
  <p>I sum up the plugin configuration on Redmine as it follows:</p>
  
  <pre><code>Configuration type: IMAP
  Is configuration active? true
  Host : imap.gmail.com
  Port: 993
  SSL? yes
  Email username: mailAddress
  Password: mailAccountPwd
  Folder Name: Inbox
  Method for unknown users: accept
  </code></pre>
  
  <p>Now, I must run a Cron Job. At this link:</p>
  
  <p><a href="https://github.com/luismaia/redmine_email_fetcher" rel="nofollow">https://github.com/luismaia/redmine_email_fetcher</a></p>
  
  <p>I have found  the following: </p>
  
  <pre><code>*/5 * * * *   www-data /usr/bin/rake -f /opt/redmine/Rakefile --silent redmine:plugins:email_fetcher:fetch_all_emails RAILS_ENV=production 2&gt;&amp;- 1&gt;&amp;
  </code></pre>
  
  <p>that I personalize as it follows: </p>
  
  <pre><code>*/5 * * * *   www-data /usr/bin/rake -f /opt/redmine/Rakefile --silent redmine:plugins:email_fetcher:fetch_all_emails RAILS_ENV=production host=imap.gmail.com username=mailAddress password= mailAccountPwd port=993  --trace
  </code></pre>
  
  <p>Coming to the point: the line above doesn't work; and I've no idea why.</p>
  
  <p>I can add that:</p>
  
  <ul>
  <li>in <code>/usr/bin</code> I see <code>rake2.1</code></li>
  <li><code>opt</code> directory (<code>/var/opt</code>) is empty.</li>
  </ul>
  
  <p>I do hope I have explained my issue in a decent way.</p>
  
  <p>Thank you in advance, really.</p>
  
  <p>ps:
  I tried also:</p>
  
  <pre><code>*/5 * * * *   www-data /usr/bin/rake2.1 -f /var/www/redmine/Rakefile redmine:plugins:email_fetcher:fetch_all_emails RAILS_ENV=production 2&gt;&amp;- 1&gt;&amp;- 
  </code></pre>
  
  <p>but nothing happens.</p>