天天看點

crontab執行定時shell腳本提示no such file or directory錯誤的解決辦法

在Linux系統中利用crontab設定定時任務,執行shell腳本報錯no such file or directory

手動執行.sh檔案能夠成功,設定定時任務卻報錯no such file or directory

解決辦法

先cd進shell腳本所在檔案夾(路徑為絕對路徑),再執行

如圖

crontab執行定時shell腳本提示no such file or directory錯誤的解決辦法

繼續閱讀