1 Star 9 Fork 3

yuanzh / think-crontab-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

ThinkPHP6 实现可视化定时任务

基于ThinkPHP6.0和layui的 crontab 事例

概述

Thinkphp6 实现可视化秒级定时任务。兼容 Windows 和 Linux 系统。

其实就可视化页面部分本项目采用 TP 框架 + Layui 实现 ,当然也可以用其他方式,比如,纯 HTML + CSS + JS。因为定时任务本身是一个扩展包 yzh52521/http-crontab 它不依赖任何框架,且提供了定时任务操作的接口

系统定时任务使用方法

  1. 进入项目根目录
  2. 执行 composer install
  3. 拷贝 .example.env 文件为 .env,并配置正确的数据库
  4. 执行命令 php think run -p 8888,语法参照 thinkphp6 手册
  5. 执行命令 **php think crontab start **
  6. 访问后台 http://127.0.0.1:8888/admin

定时器格式说明:

0   1   2   3   4   5
|   |   |   |   |   |
|   |   |   |   |   +------ day of week (0 - 6) (Sunday=0)
|   |   |   |   +------ month (1 - 12)
|   |   |   +-------- day of month (1 - 31)
|   |   +---------- hour (0 - 23)
|   +------------ min (0 - 59)
+-------------- sec (0-59)[可省略,如果没有0位,则最小时间粒度是分钟]

效果展示

控制台:

后台:

  • 定時任务列表

  • 定时任务执行记录

  • 定时任务添加

特别感谢:

Workerman

EasyAdmin

Layui

空文件

简介

ThinkPHP6 实现可视化定时任务 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
PHP
1
https://gitee.com/yzh52521/think-crontab-demo.git
git@gitee.com:yzh52521/think-crontab-demo.git
yzh52521
think-crontab-demo
think-crontab-demo
master

搜索帮助