如何通過腳本創建 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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章