[英]Why does the codeigniter cron not working
我試圖in codeIgniter on my localhost
設置cronjob in codeIgniter on my localhost
以便當我從終端運行相同的路徑時,它可以工作
這是我從cli(terminal)運行的路徑:
/usr/bin/php /home/user_name/path_to_index.php users foo
這有效
但是當我在crontab文件中將此設置為:
3 * * * * /usr/bin/php /home/user_name/path_to_index.php users foo
這是行不通的。
知道這里有什么問題嗎?
提前致謝!
嘗試這個
/usr/bin/curl http://examblewebsite/index.php/front/cronjob
front
-控制器名稱
cronjob
函數名稱
在您的本地主機
0 13 * * * php [application_path]/index.php cli/reminders
如果您有更多詳細信息,請參閱此鏈接
如果您嘗試的默認方法不起作用,則可以通過http協議撥打電話。
wget http://example.com/example/test/bar/
要么
curl http://example.com/example/test/bar/
參考: http : //mildcoder.com/handling-codeigniter-in-cli-and-cron-jobs/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.