PHPackages                             foowie/cron - 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. foowie/cron

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

foowie/cron
===========

Cron

v0.3(5y ago)017.6k1BSD-3-ClausePHPPHP &gt;=5.6

Since Mar 19Pushed 5y ago2 watchersCompare

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

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

cron
====

[](#cron)

Cron extension for Nette Framework

For installation, use CronExtension in your bootstrap or config file. It is necessary to create database table defined in cron.sql file. However, this is required only when using MidnightJob or TimeIntervalJob.

Every task that should run as a cron task must implements IJob interface, or you can use CallbackJob to avoid this requirement.

There are two classes that provides delayed cron task execution. One is MidnightJob, that executes given IJob immediately after midnight. Second is TimeIntervalJob, that repeatedly executes task every given time interval.

To handle job by Cron, you should define tag \[cronJob\] on every service in your config file.

For instance, if you have class FooClass that should be processed every 1 hour, you have to specify in your config file:

```
services:
  foo: FooClass
  fooJob:
    class: Foowie\Cron\Job\TimeIntervalJob('foo', '1 hour', @foo)
    tags: [cronJob]

```

Note that first parameter in class TimeIntervalJob is unique name of cron task. If FooClass does not implements IJob interface, you can use CallbackJob decorator.

```
services:
  foo: FooClass
  fooJobDecorator: Foowie\Cron\Job\CallbackJob([@foo, 'methodNameToExecute'])
  fooJob:
    class: Foowie\Cron\Job\TimeIntervalJob('foo', '1 hour', @fooJobDecorator)
    tags: [cronJob]

```

To select &amp; execute tasks run Cron::run() method.

By default, the CronPresenter in FoowieCron module is mapped to url /cron/. To use this presenter, it is needed to specify token in your config file with key securityToken. To disable security token, set its value to null. To disable CronPresenter, set property mapPresenter in config to false.

There is also support for Doctrine 2. Default behavior is to autodetect used ORM. You can set it manually in config with key repositoryType \[ndb, doctrine\]. Entity Foowie\\Cron\\JobInfo has mapping metadata in src/Foowie/Cron/metadata/Foowie.Cron.JobInfo.dcm.xml. If you're using Kdyby\\Doctrine, alternative KdybyDoctrineCronExtension also maps this entity.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Every ~802 days

Total

4

Last Release

2037d ago

PHP version history (2 changes)v0.2.1PHP &gt;=5.4 &lt;7.2

v0.3PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a28d61557f073f3c6aa607ad25d233635384c42a9596fb8368f3dcaf729657c?d=identicon)[Foowie](/maintainers/Foowie)

---

Top Contributors

[![foowie](https://avatars.githubusercontent.com/u/301159?v=4)](https://github.com/foowie "foowie (21 commits)")[![davefu](https://avatars.githubusercontent.com/u/2168632?v=4)](https://github.com/davefu "davefu (2 commits)")

---

Tags

nettecron

### Embed Badge

![Health badge](/badges/foowie-cron/health.svg)

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

###  Alternatives

[bileto/cronner

Simple tool which helps with maintenance of cron tasks.

752.1k](/packages/bileto-cronner)[nette/web-project

Nette: Standard Web Project

10991.8k](/packages/nette-web-project)[contributte/menu-control

Menu control for Nette framework

29108.6k1](/packages/contributte-menu-control)[carrooi/nette-menu

Menu control for Nette framework

2950.0k1](/packages/carrooi-nette-menu)

PHPackages © 2026

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