noir/php-at-job-queue-wrapper
Composer 安装命令:
composer require noir/php-at-job-queue-wrapper
包简介
A PHP wrapper for the unix `at` queue
关键字:
README 文档
README
A PHP class to wrap the Unix/Linux at/atd job queue. At allows you to specify a job that the system should run at certain point in time. For more information on at either run man at in your console or visit man page This class lets you add new items to the queue either as a command or a path to a file and it can also give you back a list of the jobs already in the queue. You have the option to supply a queue letter that the wrapper should use so you can seperate out your jobs. For example::
Migrate to v2
Since the PHP 7.x version has been released for about whiles, the 1.x version will not be active and please concern about 2.x version.
require 'vendor/autoload.php'; use Treffynnon\At\Wrapper as At // create a command job $job = 'echo "hello" | wall'; $time = 'now + 1min'; // save command job to queue letter c $queue = 'c'; At::cmd($job, $time, $queue); // create a file job $job = '/home/example/example.sh'; // save file job to queue letter f $queue = 'f'; At::file($job, $time, $queue); // create a file job and send it to // the default queue (determined by at) At::file($job, $time); // get a list of all the jobs in the queue var_dump(At::lq()); // get a list of all the jobs in the f queue var_dump(At::lq('f')); // get a list of all the jobs in the c queue var_dump(At::listQueue('c'));
PHP 5.3 is required to support the use of the namespace, but this could easily be removed to make it backwards compatible with PHP 5.1 and above.
Requires
- Unix/Linux
- at (you will already have this installed as it comes with Linux distributions)
- If using PHP 5.3 and above due to the use of namespaces in the code, please use
1.xversions. - If using PHP 7.2+ version, please use
2.xversions. It will not support PHP 7.0 and PHP 7.1 versions.
Installation
With composer already setup/init in your project you can add this project with:
composer require treffynnon/php-at-job-queue-wrapper
Running the Tests
Clone this repository and install the development dependencies using composer:
composer install
Once complete you can simply run:
composer run-script test
from the root directory of the at Job Queue Wrapper.
Troubleshooting Failed Tests
The tests may fail if your version of at outputs differently when a new job is added or when the at queue is listed. The class has to long but simple regular expressions defined as properties in it. With a little knowledge of regex you can modify these to suit the output of the at binary on your operating system.
If you find that you need to modify these regexs then please lodge a ticket on github.
Currently Tested Output Styles
Redhat
Add job
[root@server home]# echo 'echo "hello" \| wall' | at now +10min
job 3 at 2010-11-15 10:54
List queue
[root@server home]# at -l
2 2010-11-15 10:53 a root
3 2010-11-15 10:54 a root
Ubuntu
Add job
user@server:~$ echo 'echo "hello" \| wall' | at now +10min
warning: commands will be executed using /bin/sh
job 17 at Mon Nov 15 10:55:00 2010
List queue
user@server:~$ at -l
17 Mon Nov 15 10:55:00 2010 a simon
18 Mon Nov 15 10:55:00 2010 a simon
noir/php-at-job-queue-wrapper 适用场景与选型建议
noir/php-at-job-queue-wrapper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「queue」 「job queue」 「at」 「linux」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 noir/php-at-job-queue-wrapper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 noir/php-at-job-queue-wrapper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 noir/php-at-job-queue-wrapper 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Brotli binary provided by google/brotli and compiled for amd64
PHP AMQP Binding Library
Advanced local development experience for Linux.
Provides a possibility to auto-setup crontabs required for project based on configuration file.
SlimQ Enables You to push jobs to background workers
A Laravel package to monitor queue jobs.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2026-01-07