dqwr32867 2013-08-09 12:45
浏览 25

为什么codeigniter cron不工作

I am trying to set up cronjob in codeIgniter on my localhost so that when I run the same path from terminal it works

This is the Path I have run from the cli(terminal):

/usr/bin/php /home/user_name/path_to_index.php users foo

this works

but when I set this in the crontab file as :

 3 * * * *  /usr/bin/php /home/user_name/path_to_index.php users foo

this is not working.

any idea what is wrong here?

thanks in advance!

  • 写回答

2条回答 默认 最新

  • douzhan4522 2013-08-09 13:09
    关注

    Try this

    /usr/bin/curl http://examblewebsite/index.php/front/cronjob
    

    front - Controller name

    cronjob - function name

    in your localhost

    0 13 * * * php [application_path]/index.php cli/reminders
    

    if you have more details see this link

    评论

报告相同问题?

悬赏问题

  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?