Git auto-pull using cronjob

后端 未结 5 1543
死守一世寂寞
死守一世寂寞 2020-12-12 12:55

I was trying to create a cronjob with a task to do a git pull every minute to keep my production site in sync with my master branch.

The git pull needs

5条回答
  •  悲&欢浪女
    2020-12-12 13:30

    Solution:

    */1 * * * * su -s /bin/sh nobody -c 'cd ~dstrt/www && /usr/local/bin/git pull -q origin master' 
    

提交回复
热议问题