strukt/tasker
Composer 安装命令:
composer create-project strukt/tasker
包简介
Simple php task manager
README 文档
README
A simple task manager for php.
Getting started
wget https://github.com/samweru/strukt-tasker/releases/download/v1.0.1-alpha/tasker.phar #download chmod a+x tasker.phar #make executable mv tasker.phar tasker #rename
Usage
By default, task manager will create tasker.php file if one isn't found when you execute the tasker command.
The intial tasker.php file contains a single command test.
How to list commands:
$ tasker list
version Tasker version
list List commands
test Sample task
Below is sample tasker.php
/** * Show today's date */ task('date', function(){ $date = new \DateTime(); echo(sprintf("Now: %s\n", $date->format("Y-m-d H:i:s"))); }); /** * Say hello to someone */ task("hello", function(string $name){ writeln(sprintf("Hello %s!", $name)); }); /** * Say hello to the world */ task('test', function(){ go("hello", " World!"); }); /** * Watch changes in javascript files */ task("watch:js", function(){ watch("app/js", function($files){ $changes = []; foreach($files as $file) $changes[] = sprintf("%s\n", $file); print_r(implode("\n", $changes)); }); }); /** * List directories */ task("lsdir", function(){ list($output, $error) = run("ls -al", function($output){ echo $output; }); });
Boxing
First you'll need to install phive
wget -O phive.phar https://phar.io/releases/phive.phar wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 gpg --verify phive.phar.asc phive.phar chmod +x phive.phar sudo mv phive.phar /usr/local/bin/phive
Then, install Box globally.
phive install humbug/box --force-accept-unsigned
..and update.
phive update humbug/box --force-accept-unsigned
..or install Box locally.
composer require --dev bamarni/composer-bin-plugin composer bin box require --dev humbug/box vendor/bin/box
..or
$ curl -LSs https://box-project.github.io/box2/installer.php | php
strukt/tasker 适用场景与选型建议
strukt/tasker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 12 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 strukt/tasker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 strukt/tasker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-31