PHPackages                             boldgrid/tdcron - 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. boldgrid/tdcron

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

boldgrid/tdcron
===============

A simple utility to manipulate cron jobs.

1.0.0(3y ago)014GPL-2.0-or-laterPHP

Since Nov 2Pushed 2y ago4 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

> **WARNING**: This class was written back in 2010 ! Its pretty much untested with all PHP versions &gt; 5.6.0 and might act funny. I mostly pushed it to GitHub for easier access and in case if somebody is looking for a simple cron-parser.

tdCron
======

[](#tdcron)

tdCron is a ***very*** simple class to parse cron-expressions and calculate schedules.

For something more sophisticated (and WAY more modern) you can take a look at the [cron-expression](https://github.com/dragonmantank/cron-expression) package by Michael Dowling and Chris Tankersley.

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

Just include `class.tdcron.php` and `class.tdcron.entry.php` in your project and you're done.

Documentation
-------------

[](#documentation)

As i mentioned before - this class is really, really simple :-)

Please just look at the code in `test.php` and `class.tdcron.php` - its reasonably well documented and should be pretty easy to understand.

It basically comes down to calling `tdCron::getNextOccurrence()` or `tdCron::getLastOccurrence()` with your cron-expression as the first parameter and an optional reference-time as the second parameter.

Lets say you've got a cron-expression like `5 0 * 8 2` (so something at 00:05 on every tuesday in august). You could use something like

```
echo 'next: '.date('d.m.Y, H:i:s', tdCron::getNextOccurrence('5 0 * 8 2');

```

to see when it should run the next time.

Running the tests
-----------------

[](#running-the-tests)

There aren't any "real" tests included with the class (so you won't find any PHPUnit-stuff here). You can find a bunch of edge-cases in the test.php / test.data.php files that were used to test the class during development.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

1292d ago

### Community

Maintainers

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

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

---

Top Contributors

[![chland](https://avatars.githubusercontent.com/u/472894?v=4)](https://github.com/chland "chland (3 commits)")[![cssjoe](https://avatars.githubusercontent.com/u/11447263?v=4)](https://github.com/cssjoe "cssjoe (1 commits)")[![jamesros161](https://avatars.githubusercontent.com/u/49331357?v=4)](https://github.com/jamesros161 "jamesros161 (1 commits)")

### Embed Badge

![Health badge](/badges/boldgrid-tdcron/health.svg)

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

###  Alternatives

[roave/dont

A small set of traits that can be used to prevent misuse of your objects

399257.4k3](/packages/roave-dont)

PHPackages © 2026

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