I tried to create a cronjob with the task of doing git pull every minute, so that my production site synchronized with my main branch.
The git output should be executed by the nobody system user due to a permission problem. However, it seems that the nobody account is not allowed to run commands. So I have to create tasks as root .
In crontab, I tried:
*/1 * * * * su -s /bin/sh nobody -c 'cd ~heilee/www && git pull -q origin master' >> ~/git.log
This does not work, and I do not know how to debug it.
Can anyone help?
UPDATE1: The git pull command is correct. I can run it without errors.
git cron
kayue Dec 10 '10 at 23:14 2010-12-10 23:14
source share