备案/许可证编号:粤ICP备17106855号,工信部网站(http://www.beian.miit.gov.cn)
根据前几篇博客中能自己创建一个博客,并在github.io上访问到自己的博客,但是如果自己有服务器,那怎么能定时获取github上面自己的博客到自己的服务器上呢?如下图
12345678910111213141516
copyS.sh:#!/bin/bashcd /var/git clone https://github.com/porschan/porschan.github.io.gittime=$(date "+%Y%m%d")mv /var/www/ /var/www_backfile/www_${time}mv /var/porschan.github.io /var/wwwecho "${time}" >> /var/copyLog.txt
12345678910111213
root@porschan:/var# crontab -e添加:40 14 * * * /var/copyS.shctrl + x -> 输入 Y -> 按enter键查看是否在定时任务中root@porschan:/var# crontab -l