title: Command runs fine in terminal, but not when run as cron job
body: <p>I am trying to run the following test command every minute with cron:</p>
  
  <pre><code>apachectl status | grep 'requests currently being processed' &amp;&amp; 'date' &gt;&gt; /output.txt 2&gt;&amp;1
  </code></pre>
  
  <p>This would run <code>apachectl status</code> and if the output contains 'requests currently being processed', it would print the result of the command <code>date</code> to the file output.txt.</p>
  
  <p>If I run this in the terminal as the root user, there is no issue. However, running it as a cronjob every minute (I've added it to <code>/var/spool/cron/root</code>) as follows:</p>
  
  <pre><code>*/1 * * * * apachectl status | grep 'requests currently being processed' &amp;&amp; 'date' &gt;&gt; /output.txt 2&gt;&amp;1
  </code></pre>
  
  <p>Does nothing - the <code>output.txt</code> file never gets generated and the job never shows in the log at <code>/var/log/cron</code>. What might the issue be?</p>