Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save aprchen/354f6559b387df3e0a778fb1966dd472 to your computer and use it in GitHub Desktop.

Select an option

Save aprchen/354f6559b387df3e0a778fb1966dd472 to your computer and use it in GitHub Desktop.
pull.ssh 脚本内容 注意文件权限更改为可执行
#!/bin/sh
PATH="/data/wwwroot/yn"
cd $PATH
/usr/bin/git pull
crontab -e 添加执行任务 第一条是忽略邮件输出 第二条每5分钟执行一次
/20 * * * * /sbin/ntpdate pool.ntp.org > /dev/null 2>&1
*/5 * * * * /data/shell/yn-pull.sh
tail -f /var/log/cron 查看定时任务是否执行成功
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment