将内容从Github管道传输到crontab

Arcticooling

我现在不在测试环境中,但是我希望下载一个Bash脚本,curl然后将其内容加载到crontab中。

Github原始文档中显示的内容例如是:

0 0 * * * ... 
0 0 * * 0 ...

这个代码模板对您来说还好吗?

curl -O https://raw.githubusercontent.com/user/repo/master/file.sh | crontab
山坡

curlstdout默认输出为

curl URL

足够的。至少在macOS上crontab需要-阅读,stdin所以我们最终得到了

curl URL | crontab -

将未验证的数据直接从URL直接加载到Cron是否明智,但这是另一个问题...

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章