codeigniter的CRON作业 [英] CRON job for codeigniter
问题描述
我使用codeigniter。我想知道如何设置一个cron作业来检查一个表是否过期,并将数据插入另一个表中包含过期用户列表。如何做到这一点。
I am using codeigniter. I want to know how to set up a cron job to check a table for expiring users and insert data in to another table with the list of expiring users. How to do that.
当我试图用控制器和模型写一个脚本插入表:
When i tried to write a script with controller and model to insert the table:
致命错误: /home/content/html/test/live/application/controllers/cron.php 中找不到类别在线 2
Fatal error: Class 'Controller' not found in /home/content/html/test/live/application/controllers/cron.php on line 2
推荐答案
有关使CodeIgniter CLI可访问的一些更多信息:
http://phpstarter.net/2008/12/run-codeigniter-from-the-command-line-ssh/
You can find some more information on making CodeIgniter CLI-accessible here: http://phpstarter.net/2008/12/run-codeigniter-from-the-command-line-ssh/
下一页步骤只是使用crontab -e来设置cronjob。
Next step is just using crontab -e to set up the cronjob.
这篇关于codeigniter的CRON作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!