Crontab不使用CodeIgniter

时间:2014-04-29 06:43:39

标签: php codeigniter

我想为我的一个项目设置cron作业,它可以在我的域上使用名为VMS的子文件夹。

我用控制器创建了cron作业:

    file:  main.php
   Class:  Main
  Method:  ExpiryAlertMail
Location: public_html/vms/application/controllers/main.php

我将尝试下面列出的方法来运行cron作业但是它给了我不同的2错误消息,不同的2个案例。那么,如何在一天内完成一次cron工作?

  

/ usr / local / php4 / bin / php /home//public_html/vms/index.php main ExpiryAlertMail

     

/ usr / bin / php -q /home//public_html/vms/index.php main ExpiryAlertMail>>的/ dev / null的

     

/ usr / bin / php /home//public_html/vms/index.php main ExpiryAlertMail

     

/ usr / bin / php /home//public_html/vms/index.php

     

0 13 * * * php home // public_html / vms / index.php main / ExpiryAlertMail

     

php /home//public_html/vms/cron.php / main / ExpiryAlertMail

     

〜/ public_html / vms / index.php main ExpiryAlertMail

     

wget http://www.domain.com/vms/main/ExpiryAlertMail

     

php -q /home//public_html/vms/index.php?c=main&m=ExpiryAlertMail

     

/ usr / bin / php-cli /home//public_html/vms/index.php main ExpiryAlertMail   php /home//public_html/vms/cron.php main / ExpiryAlertMail

     

wget -O - -q -t 1 http://www.domain.com/vms/cron/run

1 个答案:

答案 0 :(得分:0)

如果您的脚本可以通过网址请求,则可以尝试

  

0 13 * * * curl'[your script url]'

相关问题