PHPackages                             treffynnon/php-at-job-queue-wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. treffynnon/php-at-job-queue-wrapper

AbandonedArchivedLibrary[Queues &amp; Workers](/categories/queues)

treffynnon/php-at-job-queue-wrapper
===================================

A PHP wrapper for the unix `at` queue

2.0.0(5y ago)629.5k↓33.3%11[1 issues](https://github.com/treffynnon/PHP-at-Job-Queue-Wrapper/issues)BSD-2-ClausePHPPHP &gt;=7.2

Since Feb 16Pushed 5y ago8 watchersCompare

[ Source](https://github.com/treffynnon/PHP-at-Job-Queue-Wrapper)[ Packagist](https://packagist.org/packages/treffynnon/php-at-job-queue-wrapper)[ Docs](http://github.com/treffynnon/PHP-at-Job-Queue-Wrapper)[ RSS](/packages/treffynnon-php-at-job-queue-wrapper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (0)

PHP at Job Queue Wrapper
========================

[](#php-at-job-queue-wrapper)

[![build](https://github.com/treffynnon/PHP-at-Job-Queue-Wrapper/workflows/build/badge.svg)](https://github.com/treffynnon/PHP-at-Job-Queue-Wrapper/workflows/build/badge.svg) [![Latest Stable Version](https://camo.githubusercontent.com/5b28099ec2d2256fc45f2b862c432b197719e42c3b48202fa70b96246bcf98d2/68747470733a2f2f706f7365722e707567782e6f72672f7472656666796e6e6f6e2f7068702d61742d6a6f622d71756575652d777261707065722f76)](//packagist.org/packages/treffynnon/php-at-job-queue-wrapper) [![Total Downloads](https://camo.githubusercontent.com/685d25eb767792e444b659ad5b5046d8760ee3ce62731790c45f2a30b99fc456/68747470733a2f2f706f7365722e707567782e6f72672f7472656666796e6e6f6e2f7068702d61742d6a6f622d71756575652d777261707065722f646f776e6c6f616473)](//packagist.org/packages/treffynnon/php-at-job-queue-wrapper) [![Latest Unstable Version](https://camo.githubusercontent.com/ca8d8815b2a33f51c1059f973b704ad42cc430756b244e14d4e162d56f3350d0/68747470733a2f2f706f7365722e707567782e6f72672f7472656666796e6e6f6e2f7068702d61742d6a6f622d71756575652d777261707065722f762f756e737461626c65)](//packagist.org/packages/treffynnon/php-at-job-queue-wrapper) [![License](https://camo.githubusercontent.com/8b8abbbaface45efb48bf05fbeae9ad593969051b064b998fac8d7a9aff61ecc/68747470733a2f2f706f7365722e707567782e6f72672f7472656666796e6e6f6e2f7068702d61742d6a6f622d71756575652d777261707065722f6c6963656e7365)](//packagist.org/packages/treffynnon/php-at-job-queue-wrapper)

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](http://unixhelp.ed.ac.uk/CGI/man-cgi?at) 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
=============

[](#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
--------

[](#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.x` versions.
- If using PHP 7.2+ version, please use `2.x` versions. **It will not support PHP 7.0 and PHP 7.1 versions**.

Installation
------------

[](#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
-----------------

[](#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
----------------------------

[](#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](https://github.com/treffynnon/PHP-at-Job-Queue-Wrapper/issues).

Currently Tested Output Styles
------------------------------

[](#currently-tested-output-styles)

### Redhat

[](#redhat)

#### Add job

[](#add-job)

```
[root@server home]#  echo 'echo "hello" \| wall' | at now +10min
job 3 at 2010-11-15 10:54

```

#### List queue

[](#list-queue)

```
[root@server home]# at -l
2       2010-11-15 10:53 a root
3       2010-11-15 10:54 a root

```

### Ubuntu

[](#ubuntu)

#### Add job

[](#add-job-1)

```
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

[](#list-queue-1)

```
user@server:~$ at -l
17      Mon Nov 15 10:55:00 2010 a simon
18      Mon Nov 15 10:55:00 2010 a simon

```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 65.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~321 days

Recently: every ~230 days

Total

6

Last Release

2139d ago

Major Versions

1.0.5 → 2.0.02020-07-10

PHP version history (2 changes)1.0.1PHP &gt;=5.3.2

2.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/aca88e0a99332b6532211cdcbeb22d7861f76eafc9158d33e50d2ce33eeebd6e?d=identicon)[Treffynnon](/maintainers/Treffynnon)

---

Top Contributors

[![treffynnon](https://avatars.githubusercontent.com/u/65215?v=4)](https://github.com/treffynnon "treffynnon (30 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (14 commits)")[![zelu](https://avatars.githubusercontent.com/u/427701?v=4)](https://github.com/zelu "zelu (2 commits)")

---

Tags

queuelinuxatjob queue

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/treffynnon-php-at-job-queue-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/treffynnon-php-at-job-queue-wrapper/health.svg)](https://phpackages.com/packages/treffynnon-php-at-job-queue-wrapper)
```

###  Alternatives

[php-amqplib/php-amqplib

Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.

4.6k125.3M879](/packages/php-amqplib-php-amqplib)[ramsey/collection

A PHP library for representing and manipulating collections.

1.2k486.0M69](/packages/ramsey-collection)[queue-interop/queue-interop

Promoting the interoperability of MQs objects. Based on Java JMS

48130.5M87](/packages/queue-interop-queue-interop)[phootwork/collection

The phootwork library fills gaps in the php language and provides better solutions than the existing ones php offers.

3924.8M15](/packages/phootwork-collection)[apinstein/jqjobs

Async job manager for PHP.

3220.2k](/packages/apinstein-jqjobs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
