title: Crontab with wget running one command but not another
body: <p>I have the following crontab file where the first wget command works but the other doesn't. The code on the two urls is identical, just one is on my development domain and the other is the production domain.</p>
  
  <pre><code>SHELL=/bin/sh PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
  MAILTO=me@mydomain.com
  #
  # check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
  #
  -*/15 * * * *   root  test -x /usr/lib/cron/run-crons &amp;&amp; /usr/lib/cron/run-crons /dev/null 2&gt;&amp;1
  
  * * * * * /usr/bin/wget -O /dev/null -q http://dev.mydomain.com/cron/cron.php #Works fine
  
  * * * * * /usr/bin/wget -O /dev/null -q http://live.mydomain.com/cron/cron.php #Does not work
  </code></pre>
  
  <p>I have tried commenting out the working command, in case it didn't like running 2 together, but this made no difference.</p>
  
  <p>I have checked that the "live" URL works when run in the browser.</p>
  
  <p>I get no errors either from crontab or in the apache logs.</p>
  
  <p>Just nothing happens.</p>
  
  <p>I have restarted the cron daemon and even rebooted the server.</p>
  
  <p>Has anyone experienced anything like this? </p>
  
  <p><strong>EDIT</strong>
  OK I added in code to log errors and now it works:</p>
  
  <pre><code>SHELL=/bin/sh PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
  MAILTO=me@mydomain.com
  #
  # check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
  #
  -*/15 * * * *   root  test -x /usr/lib/cron/run-crons &amp;&amp; /usr/lib/cron/run-crons /dev/null 2&gt;&amp;1
  
  * * * * * /usr/bin/wget -O /dev/null -q http://dev.mydomain.com/cron/cron.php &gt;&gt; /srv/www/dev/cron/CRONdev_LOG.txt 2&gt; /dev/null 
  
  * * * * * /usr/bin/wget -O /dev/null -q http://live.mydomain.com/cron/cron.php  &gt;&gt; /srv/www/live/cron/CRONlive_LOG.txt 2&gt; /dev/null
  </code></pre>
  
  <p>Whilst I am please it works now, I would still like someone to explain why!</p>