Download the PHP package fly-cms/webman-crontab without Composer

On this page you can find all versions of the php package fly-cms/webman-crontab. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package webman-crontab

workerman/crontab实现类似宝塔的任务管理

概述

基于 webman + workerman/crontab 的定时任务组件
本组件代码参考 webman crontab任务管理组件(多类型) https://www.workerman.net/plugin/42
重构出来的。

注意事项

仅支持linux,仅支持linux,仅支持linux。
秒级任务不要小于5秒,每个进程计时器会有差异,将会导致任务在同一秒执行不同次数的任务
秒级任务必须是60的因数,经过观察发现workerman/crontab处理秒级任务,每分钟后会直接重置任务时间从头开始计算时间

安装

创建数据表

创建任务数据表。

创建日志数据表

修改配置信息

请仔细观看下面 getAllTask , getTask , writeRunLog ,updateTaskRunState 四个方法,并按要求实现类似结果
示例代码如下:

接着打开 process.php 示例如下:
count 设置定时任务进程数
这里的端口要与上面配置的listen端口进行对应
检查宝塔或者服务器对应防火墙端口是否打开 `

用法

第一步,创建路由

第二步,导入插件test目录的TaskSet控制器类
这里你需要做的功能是
1 创建对应模型类
2 edit方法添加对应的参数校验

第三步,导入插件test目录的taskSet.html文件
因为删掉项目封装代码原因,该文件只实现部分功能,仅供参考,实际请根据自己项目功能去修改

扩展任务类型

插件app.php目录里的 task_handle 数组配置任务解析类。

任务解析类你必须实现下面方法,并且返回code与log字段,code 0 代表成功,1 失败,log字段必须为string类型

常见错误

1 未正确配置redis信息
2 未正确配置端口信息
3 未实现配置信息里面的 getAllTask ,getTask ,writeRunLog,updateTaskRunState四个方法
4 端口未放行导致无法通讯


All versions of webman-crontab with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-json Version *
workerman/redis Version *
workerman/crontab Version ^1.0
ext-redis Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fly-cms/webman-crontab contains the following files

Loading the files please wait ....