罕用,結果就是每次用每次忘…。
- 如果執行檔放在 system-wide 定義的 PATH 以外(= Cron 執行時使用的身分),就要指定絕對路徑,像是透過 RVM 安裝的 Ruby,或是在 crontab 裡載明 PATH。
- 如果使用 RVM 則要在 crontab 裡載明 RVM 專用的 GEM_PATH,否則就會爆 LoadError。
- 用 sh -c ‘target_cmds’還不夠,最好是用 sh -l -c ‘target_cmds’ 更不容易出包。
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
發佈留言