PHPackages                             taueres/easy-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. taueres/easy-crontab

ActiveLibrary

taueres/easy-crontab
====================

Object oriented API for reading and writing crontab

07PHP

Since Sep 24Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

EasyCrontab
===========

[](#easycrontab)

Object oriented API for reading and writing to/from crontab.

[![Build Status](https://camo.githubusercontent.com/e20eb45fc27f8ca8399b294c897a55676f22981c685f947fdae9c1c19250f08b/68747470733a2f2f7472617669732d63692e6f72672f746175657265732f656173792d63726f6e7461622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/taueres/easy-crontab)

Installing
----------

[](#installing)

### Via Composer

[](#via-composer)

```
composer require taueres/easy-crontab

```

### Otherwise manually

[](#otherwise-manually)

Clone git repository.

```
git clone https://github.com/taueres/easy-crontab.git ./vendor/easy-crontab

```

Add the following PSR-4 rules to your autoload system.

```
"psr-4": {
    "EasyCrontab\\": "vendor/easy-crontab/src/EasyCrontab",
    "EasyCrontab\\Test\\": "vendor/easy-crontab/test"
}

```

Install EasyCrontab dependencies.

```
"require": {
    "symfony/process": "^2.7",
    "symfony/dependency-injection": "^2.7",
    "symfony/config": "^2.7"
}

```

Examples
--------

[](#examples)

EasyCrontab is very easy to grasp.

The following examples will cover common use cases of EasyCrontab.

### Print command of the first job registered

[](#print-command-of-the-first-job-registered)

```
$crontab = EasyCrontab\CrontabFactory::getCrontab();
$jobs = $crontab->getJobs();
echo $jobs[0]->getCommand();
```

### Add a new job to crontab

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

```
$job = new EasyCrontab\Job();
$job->setMinute('*/5');
$job->setHour('5');
$job->setDayOfMonth('*');
$job->setMonth('*');
$job->setDayOfWeek('*');
$job->setCommand('php --version');

$crontab = EasyCrontab\CrontabFactory::getCrontab();
$crontab->addJob($job);
$crontab->save();
```

### Edit job info

[](#edit-job-info)

```
$crontab = EasyCrontab\CrontabFactory::getCrontab();
$jobs = $crontab->getJobs();
$jobs[0]->setDayOfWeek('3');
$crontab->save();
```

### Remove job from crontab

[](#remove-job-from-crontab)

```
$crontab = EasyCrontab\CrontabFactory::getCrontab();
$jobs = $crontab->getJobs();
$crontab->removeJob($jobs[0]);
$crontab->save();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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/ea27c3ed3733928ec29c88d86fc138560f8fd62224eb006617615534332fd5b4?d=identicon)[taueres](/maintainers/taueres)

---

Top Contributors

[![taueres](https://avatars.githubusercontent.com/u/3669079?v=4)](https://github.com/taueres "taueres (14 commits)")

### Embed Badge

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

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

PHPackages © 2026

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