title: Git auto-pull using cronjob
body: <p>I was trying to create a cronjob with a task to do a <code>git pull</code> every minute to keep my production site in sync with my master branch. </p>
  
  <p>The git pull needs to be done by the system user <code>nobody</code>, due to the permissions problem. However it seems that the <code>nobody</code> account is not allowed run commands. So I have to create tasks as the <code>root</code> user.</p>
  
  <p>The crontab entry I tried:</p>
  
  <pre><code>*/1 * * * * su -s /bin/sh nobody -c 'cd ~heilee/www &amp;&amp; git pull -q origin master' &gt;&gt; ~/git.log
  </code></pre>
  
  <p>It doesn't work, and I don't know how to debug it. </p>
  
  <p>Could anyone help?</p>
  
  <p>UPDATE1: the <code>git pull</code> command itself is correct. I can run it without errors.</p>