PHPackages                             puff/job - 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. puff/job

ActiveLibrary

puff/job
========

Fiber-based cron job scheduler for PHP Unison Fiber Framework

00PHP

Since Aug 25Pushed todayCompare

[ Source](https://github.com/php-puff/job)[ Packagist](https://packagist.org/packages/puff/job)[ RSS](/packages/puff-job/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Puff Job
========

[](#puff-job)

Fiber-based, second-level cron scheduling for PHP Unison Fiber Framework. The package is discovered automatically and runs in one dedicated worker process.

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

[](#installation)

```
composer require puff/job:dev-main
```

Register job classes directly in the application configuration:

```
'job' => [
    App\Job\CleanupJob::class,
],
```

Each class is resolved through the shared dependency injection container and must implement `JobInterface`:

```
use Puff\Job\JobInterface;
use Puff\Job\Schedule;

#[Schedule('0 */5 * * * *')]
final class CleanupJob implements JobInterface
{
    public function run(): void
    {
        // Perform scheduled work.
    }
}
```

Cron syntax
-----------

[](#cron-syntax)

Expressions contain six fields:

```
second minute hour day-of-month month day-of-week

```

Fields support `*`, comma-separated values, ranges, and steps. Both `*/5` and the legacy `/5` shorthand mean every five units. Sunday may be written as `0` or `7`. When both day-of-month and day-of-week are restricted, either field may match, following traditional cron behavior.

Every job class must declare exactly one `#[Schedule('...')]` attribute. Expressions are validated when the worker boots. Missing or invalid attributes stop startup with the affected job class in the error message. Cron matching uses the application's PHP default timezone.

Runtime behavior
----------------

[](#runtime-behavior)

- Jobs run in separate Fibers, so one job does not block other due jobs.
- A job is skipped when a previous invocation of the same class is still running.
- Exceptions are logged and isolated; the job is eligible again at its next scheduled time.
- Missed times are not replayed after a pause or restart.
- The component always uses one worker to prevent duplicate local execution. Cross-host locking, retries, persistent history, and forced timeouts are intentionally outside this version.
- A bound PSR-3 logger is used when available. Otherwise the scheduler uses `NullLogger`.

###  Health Score

20

↑

LowBetter than 12% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![dcto](https://avatars.githubusercontent.com/u/5618679?v=4)](https://github.com/dcto "dcto (2 commits)")

### Embed Badge

![Health badge](/badges/puff-job/health.svg)

```
[![Health](https://phpackages.com/badges/puff-job/health.svg)](https://phpackages.com/packages/puff-job)
```

PHPackages © 2026

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