Cron job not logging output - Whenever gem
<p>I'm new to cron and started using Whenever gem to perform scheduled tasks. However, sometimes they stall and I have to restart the app for it to pick up again. So, I wanted to inspect the logs to see if there are any exceptions that might cause it. </p>

<p>According to <a href="https://github.com/javan/whenever/wiki/Output-redirection-aka-logging-your-cron-jobs" rel="nofollow">this wiki</a>, I put a line in my <code>schedule.rb</code> setting the output location:</p>

<pre><code>set :output, "/var/log/cron.log"
</code></pre>

<p>But this file is always empty. </p>

<p>I tried doing manually from the terminal <code>/bin/bash -l -c 'echo "hello" &gt;&gt; /var/log/cron.log 2&gt;&amp;1'</code> and it saved <code>hello</code> to the log.</p>

<p>Any thoughts? Thank you.</p>