PHPackages                             kmj/cronbundle - 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. kmj/cronbundle

ActiveSymfony-bundle[CLI &amp; Console](/categories/cli)

kmj/cronbundle
==============

Symfony2 Bundle that handles updating and installing crons into a local computers crontab

31.8k1PHP

Since Jul 1Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Demoboy/CronBundle)[ Packagist](https://packagist.org/packages/kmj/cronbundle)[ RSS](/packages/kmj-cronbundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

KMJCronBundle
=============

[](#kmjcronbundle)

Welcome to the KMJCronBundle. The goal of this bundle is to provide an easy way to manage crons. It accomplishes this goal by searching for all Symfony 2 commands using the @CronJob annotation. When found, the annotation is broken down and installed to the current user's crontab. Currently this bundle only supports linux servers. There is a know issue where if the server is running cPanel, the crontab cannot be updated. Instead list it manually and copy them to the crontab.

1. Installation

---

KMJCronBundle can conveniently be installed via Composer. Just add the following to your composer.json file:

```
// composer.json
{
    // ...
    require: {
        // ..
        "kmj/cronbundle": "dev-master"
    }
}
```

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

```
    php composer.phar update
```

Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:

```
// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new KMJ\CronBundle\KMJCronBundle(),
    // ...
);
```

2. Usage

---

The KMJCronBundle only works with Symfony 2 commands \[read more\] ().

With your command include the following annotation at the top of your command class

```
// ..
use KMJ\CronBundle\Annotations\CronJob;
/**
 * @CronJob(hour="0", minute="0")
 */
class ExampleCommand //.. {

   //..

}
```

This annotation tells the KMJCronBundle that you want to run this command to execute at 12:00 AM

Since the annotation are installed to the crontab, the standard format for crons is used where \* is wildcard. Any time frame not provided is a wildcard. Slashes are also available however you must use / not . The bundle converts this slash at installation.

So a command with the following annotation

```
@CronJob(hour="1,4", minute="/5", env="prod")
```

Would run every five minutes at 1AM and 4AM only in the production environment.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

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://avatars.githubusercontent.com/u/1925283?v=4)[Kaelin Jacobson](/maintainers/demoboy)[@Demoboy](https://github.com/Demoboy)

---

Top Contributors

[![Demoboy](https://avatars.githubusercontent.com/u/1925283?v=4)](https://github.com/Demoboy "Demoboy (5 commits)")

### Embed Badge

![Health badge](/badges/kmj-cronbundle/health.svg)

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

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)

PHPackages © 2026

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