我现在不在测试环境中,但是我希望下载一个Bash脚本,curl
然后将其内容加载到crontab中。
Github原始文档中显示的内容例如是:
0 0 * * * ...
0 0 * * 0 ...
这个代码模板对您来说还好吗?
curl -O https://raw.githubusercontent.com/user/repo/master/file.sh | crontab
curl
stdout
默认输出为
curl URL
足够的。至少在macOS上crontab
需要-
阅读,stdin
所以我们最终得到了
curl URL | crontab -
将未验证的数据直接从URL直接加载到Cron是否明智,但这是另一个问题...
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句