当前位置:网站首页>ThinkPHP+宝塔运营环境实现定时任务
ThinkPHP+宝塔运营环境实现定时任务
2022-07-27 12:52:00 【芒果芒果丶】
项目运营过程中,不可避免会有一些大数据需要定时更新,下面介绍ThinkPHP+宝塔环境的实现方式。
- 在TP框架application目录下声明command.php文件,详见下图。

- 如上图中所示,博主声明的是Applyfile,接下来在application\admin\command目录下定义Applyfile.php文件即可,详见下图。

需要注意的是,configure方法和 execute方法是必需的。
在execute方法里可以编写你的业务逻辑。
- 如上图中所示,博主声明的是Applyfile,接下来在application\admin\command目录下定义Applyfile.php文件即可,详见下图。
配置完成后,执行php think即可看到配置的可用命令(Available commands)
最后,在宝塔面板计划任务里添加applyfile即可

边栏推荐
- Using ebpf to detect rootkit vulnerabilities
- js回调函数(callback)
- Futures Commission Standard and margin ratio
- evutil_ make_ internal_ pipe_: pipe: Too many open files
- 基于frp实现内网穿透——借助公网服务器实现ssh远程连接内网服务器
- Seata's landing practice in ant International Banking
- Construction and application of industrial knowledge atlas (2): representation and modeling of commodity knowledge
- Vertical and horizontal shooting range - the mystery of the picture
- js将数组根据指定属性值分组成二维数组
- 2022年7月24日 暑假第二周训练
猜你喜欢

面试官常问:如何手撸一个“消息队列”和“延迟消息队列”?
![[300 + selected interview questions from big companies continued to share] big data operation and maintenance sharp knife interview question column (IX)](/img/cf/44b3983dd5d5f7b92d90d918215908.png)
[300 + selected interview questions from big companies continued to share] big data operation and maintenance sharp knife interview question column (IX)

Interviewers often ask: how to set up a "message queue" and "delayed message queue"?

MFC FTP创建多级文件夹、上传文件到FTP指定目录

Preliminary discussion on NetGen and Gmsh mesh generation of any multiple sub models of CAD based on osg+occ

Echart line chart displays the last point and vertical dotted line by default

Additional: [urlencoder.encode (string to be encoded, "encoding method");] (what is it?; why do we use this to encode when we set values in cookies?) (to be improved...)

What services will the futures company provide after opening an account?

Deliver temperature with science and technology, vivo appears at the digital China Construction Summit

Pat class B 1109 good at C (detailed)
随机推荐
JS module, closure application
52:第五章:开发admin管理服务:5:开发【分页查询admin账号列表,接口】;(Swagger的@ApiParam(),对方法参数进行注释;PageHelper分页插件;拦截器拦截检查登录状态)
Deliver temperature with science and technology, vivo appears at the digital China Construction Summit
浏览器内核模块组成
evutil_ make_ internal_ pipe_: pipe: Too many open files
How to fix the slip ring
Adhesive positioning
V-on basic instruction
3D laser slam:aloam---ceres optimization part and code analysis
clear
常见分布式理论(CAP、BASE)和一致性协议(Gosssip、Raft)
《C语言》函数栈帧的创建与销毁--(内功)
Redis summary: cache avalanche, cache breakdown, cache penetration and cache preheating, cache degradation
初学者入门:使用WordPress搭建一个专属自己的博客
Common distributed theories (cap, base) and consistency protocols (gosssip, raft)
52: Chapter 5: developing admin management services: 5: developing [paging query admin account list, interface]; (swagger's @apiparam(), annotate the method parameters; PageHelper paging plug-in; Inte
A brief analysis of the four process pools
How to pass parameters in JNI program
OPPO 自研大规模知识图谱及其在数智工程中的应用
滑环设备怎么进行维护