Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
スクリプト chmod を毎分自動的に使用したい これは私のスクリプトです
# vim /home/crontab/chmod.sh #!/bin/sh chmod +x /home
そして、これは私のcrontabです
# crontab -e */5 * * * * /home/crontab/chmod.sh
スクリプトと crontab の何が問題になっていますか?
毎分のCron式:-
*/1 * * * * <ur command>
スクリプトを実行するには、まずスクリプトで chmod を実行します。
chmod +x /home/crontab/chmod.sh
また、crontab とシェル スクリプトの最後に空白の新しい行を追加することを忘れないでください。