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.1.0(2mo ago)24.1k↑91.3%1[4 issues](https://github.com/PhpGt/Cron/issues)[2 PRs](https://github.com/PhpGt/Cron/pulls)4PHPPHP &gt;=8.2CI passing

Since Nov 11Pushed 3w 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 today

READMEChangelog (10)Dependencies (14)Versions (33)Used By (4)

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

54

—

FairBetter than 96% of packages

Maintenance70

Regular maintenance activity

Popularity26

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88.9% 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 ~169 days

Recently: every ~559 days

Total

17

Last Release

86d ago

Major Versions

v0.4.0 → v1.0.02019-05-31

PHP version history (5 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

v1.1.0PHP &gt;=8.2

### 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 (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

background-jobscroncron-runnercronjobcronjob-schedulercrontabno-airegular-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

[laravel/framework

The Laravel Framework.

34.8k543.8M20.0k](/packages/laravel-framework)[phpgt/webengine

Minimalistic, ergonomic PHP toolkit.

2722.3k](/packages/phpgt-webengine)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

46855.5k5](/packages/pimcore-data-importer)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M573](/packages/shopware-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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