Created
May 3, 2017 07:54
-
-
Save aprchen/354f6559b387df3e0a778fb1966dd472 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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