2013年11月18日

crontab 抓蟲小筆記

今天某支 shell script 又出問題了,不知道卡在那個環節,但是就是卡住了。
重點是這支 shell script 是放在 crontab 背景執行的,平常只有把結果導出,過程還是看不到。

google 了一下,後來把設定改成下面這樣,以後有問題只要 tail -f 就可以追蹤執行過程有沒有問題。

crontab 內容

*/1 * * * * sh -x auto.sh >auto.log 2>&1

0 意見:

張貼留言