PHPackages                             y0lk/jobby - 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. [CLI &amp; Console](/categories/cli)
4. /
5. y0lk/jobby

ActiveLibrary[CLI &amp; Console](/categories/cli)

y0lk/jobby
==========

Manage all your cron jobs without modifying crontab. Handles locking, logging, error emails, and more.

v4.0.0(1mo ago)02MITPHPPHP ^8.0CI passing

Since Oct 9Pushed 1mo agoCompare

[ Source](https://github.com/Y0lk/jobby)[ Packagist](https://packagist.org/packages/y0lk/jobby)[ Docs](https://github.com/Y0lk/jobby)[ RSS](/packages/y0lk-jobby/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (5)Versions (38)Used By (0)

Jobby, a PHP cron job manager
=============================

[](#jobby-a-php-cron-job-manager)

[![Total Downloads](https://camo.githubusercontent.com/abfe4a199e5f3d4a72406f498d290fb7fa9f739d89139c71208077b2074b6f3a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79306c6b2f6a6f6262792e737667)](https://packagist.org/packages/y0lk/jobby)[![Latest Version](https://camo.githubusercontent.com/6952944cb550e73409521be5b3961015446641885d08304c525e403f50d846de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79306c6b2f6a6f6262792e737667)](https://packagist.org/packages/y0lk/jobby)[![CI](https://github.com/Y0lk/jobby/actions/workflows/ci.yml/badge.svg)](https://github.com/Y0lk/jobby/actions/workflows/ci.yml)[![MIT License](https://camo.githubusercontent.com/375eb5653fcdd1a31fd9ce5e2788127b3ba8f5cccfa697936113f1e74ffa223c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f79306c6b2f6a6f6262792e737667)](https://github.com/Y0lk/jobby/blob/master/LICENSE)

Install the master jobby cron job, and it will manage all your offline tasks. Add jobs without modifying crontab. Jobby can handle logging, locking, error emails and more.

This repository is a maintained fork of the original abandoned `hellogerard/jobby` package. The Composer package name is `y0lk/jobby`, while the PHP namespace remains `Jobby\`. The first release of this fork is `4.0.0` because it includes breaking package and mailer changes. Current development targets PHP 8.0+ and uses `opis/closure` 4.x for closure serialization.

Tests
-----

[](#tests)

- docker run --rm --interactive --tty -v $(pwd):/app composer:2.0.7 composer install
- docker run -v $(pwd):/var/app php:8.0-cli php /var/app/vendor/bin/phpunit /var/app/tests/

Features
--------

[](#features)

- Maintain one master crontab job.
- Jobs run via PHP, so you can run them under any programmatic conditions.
- Use ordinary crontab schedule syntax (powered by the excellent [`cron-expression`](https://github.com/dragonmantank/cron-expression)).
- Run only one copy of a job at a given time.
- Send email whenever a job exits with an error status.
- Run job as another user, if crontab user has `sudo` privileges.
- Run only on certain hostnames (handy in webfarms).
- Theoretical Windows support (but not ever tested)

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

The recommended way to install Jobby is through [Composer](http://getcomposer.org):

```
$ composer require y0lk/jobby

```

Then add the following line to your (or whomever's) crontab:

```
* * * * * cd /path/to/project && php jobby.php 1>> /dev/null 2>&1

```

After Jobby installs, you can copy an example file to the project root.

```
$ cp vendor/y0lk/jobby/resources/jobby.php .

```

If you are migrating from the abandoned package, replace `hellogerard/jobby` with `y0lk/jobby` in your `composer.json`. See [UPGRADE-4.0](./UPGRADE-4.0.md) for the full migration notes.

### Running a job

[](#running-a-job)

```
