我想爲我的一個項目設置cron作業,它在我的域上使用名爲VMS的子文件夾工作。Cronjob不能使用CodeIgniter
我已經創建了cron作業帶控制器:
file: main.php
Class: Main
Method: ExpiryAlertMail
Location: public_html/vms/application/controllers/main.php
我會嘗試下列方法來運行cron作業,但它給我不同的-2的錯誤消息不同-2例。那麼,我怎樣才能在一天內運行我的cron工作?
在/ usr /本地/ PHP4 /斌/ PHP /home//public_html/vms/index.php主要ExpiryAlertMail
在/ usr/bin中/ PHP -q /家//的public_html/VMS /指數.PHP主要ExpiryAlertMail >>的/ dev/null的
在/ usr/bin中/ PHP /home//public_html/vms/index.php主要ExpiryAlertMail
在/ usr/bin中/ PHP /家//的public_html/VMS /index.php
0 13 * * * php home // public_html/vms/index.php main/ExpiryA lertMail
PHP /home//public_html/vms/cron.php /主/ ExpiryAlertMail
〜/的public_html/VMS/index.php的主ExpiryAlertMail
http://www.domain.com/vms/main/ExpiryAlertMail的wget
PHP -q /家//的public_html/VMS /的index.php?C =主&米= ExpiryAlertMail
的/ usr /斌/ PHP-CLI /home//public_html/vms/index.php主ExpiryAlertMail PHP /家//的public_html /vms/cron.php主/ ExpiryAlertMail
的wget -O - -q -t 1 http://www.domain.com/vms/cron/run
你得到的錯誤信息是什麼? – Abrixas2
案例:php/home /用戶名/ public_html/vms/cron.php/main/ExpiryAlertMail msg:您無權訪問此頁面,請聯繫管理員! 案例:php home/username/public_html/vms/index.php main/ExpiryAlertMail msg:您無權訪問此頁面,請聯繫管理員! – user3567380
案例:wget http://www.domain.com/vms/main/ExpiryAlertMail Msg:發送HTTP請求,等待響應... 406不可接受 10:35:01錯誤406:不可接受。 – user3567380