Aoi-crontab

crontab 是位好伙伴

planet 很简单粗暴,只是:

github-pages

~ User, Organization, and Project Pages - User Documentation

第一时间想到 github-pages :

github_pages_docs.png(PNG 图像,494x548 像素)

果然…那就简单了

output_dir = docs

将相关配置文件中, 指定的输出目录变成 docs, 每次 push 到 github 时,就完成了网站的更新.

定期的嗯哼

~ 在所有 UNIX/Linux 环境中, 当前是 crontab

参考:CronHowto - Community Help Wiki

先在用户 crontab 中配置

# m h  dom mon dow   command
*/10 *     * * *   /opt/cron/updates.sh

每 10 秒调用一次 updates.sh 以便调试

调试好后, 更新配置为

# m h  dom mon dow   command
42 */8     * * *   /opt/cron/updates.sh

每8小时的第42分钟,运行一次, 并将日志输出为:

opt/log/cron on default
$ ls -1
170818-planet.log
170819-planet.log
170820-planet.log
170821-planet.log

这种形式…

整体图谱

~ 所以, 最终通过一台家用服务器, 无值守的完成了一大类静态网站的更新和发布

                            du.zoomquiet.io/planet/
                                  ^ 
                                  |
                          [[github-pages]]
{rss} {rss} ... {rss}             ^
  \     |         /               |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        internet                  ^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        home wifi                 ^ 
            |                     |
            V                     |
        Ubuntu 16.4               | 
       /[ miniPC ]                |
      /     |                     |
  crontab   |                     |
    |       V                     +
    +--->(Planet) --> HTML -> git push

TODO

~ 当然的故事远没有可以结束, 等待继续折腾的有:

用时


FAQ:

自怼圈 -> 营造被动节奏外韵律

每年 4.1/8.1/12.1 定时开放报名进入

PS:

任何问题, 随时邮件提问可也:

[email protected]

大妈的多重宇宙 - YouTube

全新自媒体系列...科学幻想,读书,说故事...
点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

订阅 substack 体验古早写作:
Zoom.Quiet’s Chaos42 | Substack


关注公众号, 持续获得相关各种嗯哼:
zoomquiet


蟒营®编程思维提高班Python版

**2021.01.11** 因大妈再次创业暂停定期开设, 转换为预约触发:

Author: ;mail ; gittip ;github
2017-08-18   Log   

声明: 本文采用 BY-NC-SA 授权。转载请注明转自: #自怼圈#


Related Posts: