crontab 問題 - Linux

By Jake
at 2011-09-04T18:23
at 2011-09-04T18:23
Table of Contents
我寫了一個寫入 database 的 do.php
並且寫了一隻 do.sh
內容為 php -q /var/www/html/do.php
執行 sh do.sh 後,查 db 資料確實有寫入
我希望每 1 分鐘都執行一次這隻 shell script
於是動作為 crontab -e
寫入 */1 * * * * /var/www/html/do.sh
去查 log 也確實有跑
Sep 4 18:12:02 chan CROND[2835]: (root) CMD (/var/www/html/do.sh)
Sep 4 18:13:02 chan CROND[2853]: (root) CMD (/var/www/html/do.sh)
但資料卻沒有寫入,請問一下哪邊出了錯誤?
--
並且寫了一隻 do.sh
內容為 php -q /var/www/html/do.php
執行 sh do.sh 後,查 db 資料確實有寫入
我希望每 1 分鐘都執行一次這隻 shell script
於是動作為 crontab -e
寫入 */1 * * * * /var/www/html/do.sh
去查 log 也確實有跑
Sep 4 18:12:02 chan CROND[2835]: (root) CMD (/var/www/html/do.sh)
Sep 4 18:13:02 chan CROND[2853]: (root) CMD (/var/www/html/do.sh)
但資料卻沒有寫入,請問一下哪邊出了錯誤?
--
Tags:
Linux
All Comments

By Lucy
at 2011-09-08T21:36
at 2011-09-08T21:36

By George
at 2011-09-13T02:39
at 2011-09-13T02:39

By Caitlin
at 2011-09-17T17:25
at 2011-09-17T17:25

By Ursula
at 2011-09-22T06:17
at 2011-09-22T06:17

By Ethan
at 2011-09-22T19:40
at 2011-09-22T19:40

By Iris
at 2011-09-24T22:04
at 2011-09-24T22:04

By Hardy
at 2011-09-28T14:43
at 2011-09-28T14:43

By Ivy
at 2011-10-03T01:19
at 2011-10-03T01:19

By Tracy
at 2011-10-07T07:16
at 2011-10-07T07:16

By Madame
at 2011-10-09T03:05
at 2011-10-09T03:05

By Megan
at 2011-10-12T17:56
at 2011-10-12T17:56

By Gary
at 2011-10-13T02:01
at 2011-10-13T02:01
Related Posts
sendmail相關問題

By Connor
at 2011-09-04T15:51
at 2011-09-04T15:51
IBus第一次啓動時不會去讀設定檔

By Delia
at 2011-09-04T14:36
at 2011-09-04T14:36
Mandriva 2011 "Hydrogen" 已經釋出

By Rae
at 2011-09-04T14:07
at 2011-09-04T14:07
灌了slim之後登入畫面就不再出現了

By Olga
at 2011-09-04T11:22
at 2011-09-04T11:22
晶片裡的Linux

By Ivy
at 2011-09-04T10:21
at 2011-09-04T10:21