PHPackages                             sebastianfeldmann/crontab - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sebastianfeldmann/crontab

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sebastianfeldmann/crontab
=========================

Manage your crontab with some simple PHP commands.

242[1 PRs](https://github.com/sebastianfeldmann/crontab/pulls)PHPCI failing

Since May 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sebastianfeldmann/crontab)[ Packagist](https://packagist.org/packages/sebastianfeldmann/crontab)[ RSS](/packages/sebastianfeldmann-crontab/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Crontab
=======

[](#crontab)

[![Latest Stable Version](https://camo.githubusercontent.com/a6a7a02d6d3c69f6e9c412515b67f37161f96cb94225c37a63a05df15e5a69c5/68747470733a2f2f706f7365722e707567782e6f72672f73656261737469616e66656c646d616e6e2f63726f6e7461622f762f737461626c652e737667)](https://packagist.org/packages/sebastianfeldmann/crontab)[![Minimum PHP Version](https://camo.githubusercontent.com/824c5c4ccb56537db3b3b53bb43d7b8edc6286f3b3d1705525e0821dfd22d27e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e737667)](https://php.net/)[![Downloads](https://camo.githubusercontent.com/7a8385095160c0b5b7123da98c6a9e16945d807e5a9c0fd13ef9e8d5f013f2b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73656261737469616e66656c646d616e6e2f63726f6e7461622e7376673f7631)](https://packagist.org/packages/sebastianfeldmann/crontab)[![License](https://camo.githubusercontent.com/3fd200a30364245575ec7149ec5ad674cd63023114721f2e2fcd8dc451108811/68747470733a2f2f706f7365722e707567782e6f72672f73656261737469616e66656c646d616e6e2f63726f6e7461622f6c6963656e73652e737667)](https://packagist.org/packages/sebastianfeldmann/crontab)[![Build Status](https://github.com/sebastianfeldmann/git/workflows/CI-Build/badge.svg)](https://github.com/sebastianfeldmann/crontab/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e19862a616000e5e5c7f6571752c234f1d69bcd9b81d87e252b0950c5a0642d2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73656261737469616e66656c646d616e6e2f63726f6e7461622f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sebastianfeldmann/crontab/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/a5735972c544fc0477b99e5bee29fa3467ccd23d352e84ba2f27169c058f8a49/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73656261737469616e66656c646d616e6e2f63726f6e7461622f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sebastianfeldmann/crontab/?branch=master)

Features
--------

[](#features)

Lists all cron jobs with a nice OO interface. Add jobs to your crontab.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.0
- POSIX Shell with crontab command

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

[](#installation)

Installing *crontab* via Composer.

```
  "require": {
    "sebastianfeldmann/crontab": "~1.0"
  }
```

Usage
-----

[](#usage)

### Read crontab

[](#read-crontab)

```
$crontab = new SebastianFeldmann\Crontab\Operator();
foreach ($crontab->getJobs() as $job) {
    echo "Description: . PHP_EOL . implode(PHP_EOL, $job->getComments()) . PHP_EOL;
    echo "Schedule: " . PHP_EOL . $job->getSchedule() . PHP_EOL;
    echo "Command: " . PHP_EOL . $job->getCommand() . PHP_EOL;
}
```

### Add job to crontab

[](#add-job-to-crontab)

```
$crontab = new SebastianFeldmann\Crontab\Operator();
$crontab->addJob(
    new SebastianFeldmann\Crontab\Job(
        '30 4 * * *',
        '/foo/bar/binary',
        ['Some foo bar binary execution']
    )
);
```

This will add the following lines to your crontab.

```
# Some foobar binary execution
30 4 * * * /foo/bar/binary

```

The crontab parser is looking for commands and their description in the lines above the command. The parser expects commands to **NOT** spread over multiple lines with \\.

```
# Descriptoon for some command
10 23 * * * some command

# Next Command Description
# even more description for the next command
30 5 * * * next command

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 82.4% 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/86793722fa38096ae6ecef594df71fc85a6360fd63a3b1a6ef8c374d3d093f04?d=identicon)[sebastianfeldmann](/maintainers/sebastianfeldmann)

---

Top Contributors

[![sebastianfeldmann](https://avatars.githubusercontent.com/u/9250358?v=4)](https://github.com/sebastianfeldmann "sebastianfeldmann (28 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (6 commits)")

### Embed Badge

![Health badge](/badges/sebastianfeldmann-crontab/health.svg)

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

###  Alternatives

[nativephp/electron

Electron wrapper for the NativePHP framework.

519114.4k8](/packages/nativephp-electron)[kadet/keylighter

Yet another syntax highlighter for PHP

333.2k1](/packages/kadet-keylighter)[code16/formoj

Customizable form renderer

332.6k](/packages/code16-formoj)[nullthoughts/laravel-data-sync

Laravel utility to keep records synced between environments through source control

331.4k](/packages/nullthoughts-laravel-data-sync)

PHPackages © 2026

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