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

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

phpgt/cron
==========

Run scripts or static functions at regular intervals.

v1.0.4(1y ago)23.4k↓30%1[4 PRs](https://github.com/PhpGt/Cron/pulls)3PHPPHP &gt;=8.1CI passing

Since Nov 11Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/PhpGt/Cron)[ Packagist](https://packagist.org/packages/phpgt/cron)[ GitHub Sponsors](https://github.com/sponsors/PhpGt)[ RSS](/packages/phpgt-cron/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (27)Used By (3)

Run scripts or static functions at regular intervals.
=====================================================

[](#run-scripts-or-static-functions-at-regular-intervals)

Define background jobs in standard crontab format and the Cron Runner will execute them when they are due. Jobs can be either normal scripts, or calls to static functions with automatic autoloading taken care of.

---

[ ![Build status](https://camo.githubusercontent.com/cd289671110a35381d7927ce25e73ccf9ac3033e1c68005becc09045012987a3/68747470733a2f2f62616467652e7374617475732e7068702e67742f63726f6e2d6275696c642e737667)](https://github.com/PhpGt/Cron/actions)[ ![Code quality](https://camo.githubusercontent.com/e6d18ccbd12343db4f5eb153f7c5159296b69bf2179379e32f7feb5928c04154/68747470733a2f2f62616467652e7374617475732e7068702e67742f63726f6e2d7175616c6974792e737667)](https://app.codacy.com/gh/PhpGt/Cron)[ ![Code coverage](https://camo.githubusercontent.com/2f0a0d65aea77e79958dd9feb08f85b9adb05a181b94d22d1e92c3908d021a2b/68747470733a2f2f62616467652e7374617475732e7068702e67742f63726f6e2d636f7665726167652e737667)](https://app.codecov.io/gh/PhpGt/Cron)[ ![Current version](https://camo.githubusercontent.com/62baba7e6d33195b6662f5cd4512ec45b255271556a987c8199bf3b058b1702e/68747470733a2f2f62616467652e7374617475732e7068702e67742f63726f6e2d76657273696f6e2e737667)](https://packagist.org/packages/PhpGt/Cron)[ ![PHP.Gt/Cron documentation](https://camo.githubusercontent.com/f73f1d9c9d7dd5b9e4659a9c4f3c302721eb100caa29efc01d10dc9b22d7367a/68747470733a2f2f62616467652e7374617475732e7068702e67742f63726f6e2d646f63732e737667)](http://www.php.gt/cron)Example usage
-------------

[](#example-usage)

`crontab` file within your project directory:

```
00 * * * *	ExampleClass::hourlyTask()
0 22 * * 1-5	YourApp\Accounts\Daily::nightRoutine("you can pass properties too!")
# This is a comment. The above job will run at 10pm Mon-Fri.
*/10 * * * *	ExampleClass::runEveryTenMinutes

```

Start the Runner: `vendor/bin/cron`.

If you're using [WebEngine](https://php.gt/webengine), the Cron Runner is automatically started for you by running `gt run`.

Examples
--------

[](#examples)

There is an [example](example/README.md) directory with numbered scripts that can be run directly with `php`. Each one embeds its own crontab string so the schedule and output stay together.

Proudly sponsored by
====================

[](#proudly-sponsored-by)

[JetBrains Open Source sponsorship program](https://www.jetbrains.com/community/opensource/)

[![JetBrains logo.](https://camo.githubusercontent.com/b5639e7738c6dfae9fe3f3e20175570b7376ce2577a772e09c25c2d4f14bf86e/68747470733a2f2f7265736f75726365732e6a6574627261696e732e636f6d2f73746f726167652f70726f64756374732f636f6d70616e792f6272616e642f6c6f676f732f6a6574627261696e732e737667)](https://www.jetbrains.com/community/opensource/)

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance68

Regular maintenance activity

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 91.7% 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 ~154 days

Recently: every ~527 days

Total

16

Last Release

437d ago

Major Versions

v0.4.0 → v1.0.02019-05-31

PHP version history (4 changes)v0.0.1PHP &gt;7.1

v0.4.0PHP &gt;=7.2

v1.0.2PHP &gt;=7.4

v1.0.4PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e42344b91ce4b91ab57875969f67a0a6a48de570a08bc65d673b06b72fd3a3f?d=identicon)[g105b](/maintainers/g105b)

---

Top Contributors

[![g105b](https://avatars.githubusercontent.com/u/358014?v=4)](https://github.com/g105b "g105b (11 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

background-jobscroncron-runnercronjobcronjob-schedulercrontabregular-intervals

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[peppeocchi/php-cron-scheduler

PHP Cron Job Scheduler

8282.5M34](/packages/peppeocchi-php-cron-scheduler)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[butschster/cron-expression-generator

Cron expression generator

511.4M2](/packages/butschster-cron-expression-generator)[elements/process-manager-bundle

The Process Manager allows you to manage (define,execute...) arbitrary processes/commands in the Pimcore backend.

49633.0k5](/packages/elements-process-manager-bundle)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

44763.4k2](/packages/pimcore-data-importer)[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

63242.1k](/packages/rewieer-taskschedulerbundle)

PHPackages © 2026

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