Codeigniter 的 CRON 作业

编程入门 行业动态 更新时间:2024-10-24 22:30:44
本文介绍了Codeigniter 的 CRON 作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 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/2008/12/run-codeigniter-from-the-command-line-ssh/

You can find some more information on making CodeIgniter CLI-accessible here: http://phpstarter/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屋!

更多推荐

[db:关键词]

本文发布于:2023-03-27 04:37:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/678995.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:作业   Codeigniter   CRON

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!