如何通过脚本创建 crontab - How do I create a crontab through a script

问题:

I need to add a cron job thru a script I run to set up a server.我需要通过我运行的脚本来添加一个 cron 作业来设置服务器。 I am currently using Ubuntu.我目前正在使用 Ubuntu。 I can use crontab -e but that will open an editor to edit the current crontab.我可以使用crontab -e但这将打开一个编辑器来编辑当前的 crontab。 I want to do this programmatically.我想以编程方式执行此操作。

Is it possible to do so?有可能这样做吗?


解决方案:

参考一: https://en.stackoom.com/question/KTaM
参考二: https://stackoom.com/question/KTaM
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章