PHPackages                             xshimmy/kohana-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. [Queues &amp; Workers](/categories/queues)
4. /
5. xshimmy/kohana-cron

ActiveKohana-module[Queues &amp; Workers](/categories/queues)

xshimmy/kohana-cron
===================

This module provides a way to schedule tasks (jobs) within your Kohana application.

0.1.2(11y ago)1130MITPHPPHP &gt;=5.3.0

Since Jun 25Pushed 10y agoCompare

[ Source](https://github.com/xShimmy/kohana-cron)[ Packagist](https://packagist.org/packages/xshimmy/kohana-cron)[ Docs](https://github.com/xShimmy/kohana-cron)[ RSS](/packages/xshimmy-kohana-cron/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Kohana-Cron
===========

[](#kohana-cron)

This module provides a way to schedule tasks (jobs) within your Kohana application.

Installation
------------

[](#installation)

Step 1: Download the module into your modules subdirectory.

Step 2: Enable the module in your bootstrap file:

```
/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array(
	'cron'       => MODPATH.'cron',
	// 'auth'       => MODPATH.'auth',       // Basic authentication
	// 'codebench'  => MODPATH.'codebench',  // Benchmarking tool
	// 'database'   => MODPATH.'database',   // Database access
	// 'image'      => MODPATH.'image',      // Image manipulation
	// 'orm'        => MODPATH.'orm',        // Object Relationship Mapping
	// 'pagination' => MODPATH.'pagination', // Paging of results
	// 'userguide'  => MODPATH.'userguide',  // User guide and API documentation
));

```

Step 3: Make sure the settings in `config/cron.php` are correct for your environment. If not, copy the file to `application/config/cron.php` and change the values accordingly.

Usage
-----

[](#usage)

In its simplest form, a task is a [PHP callback](http://php.net/manual/language.pseudo-types.php#language.types.callback) and times at which it should run. To configure a task call `Cron::set($name, array($frequency, $callback))` where `$frequency` is a string of date and time fields identical to those found in [crontab](http://linux.die.net/man/5/crontab). For example,

```
Cron::set('reindex_catalog', array('@daily', 'Catalog::regenerate_index'));
Cron::set('calendar_notifications', array('*/5 * * * *', 'Calendar::send_emails'));

```

Configured tasks are run with their appropriate frequency by calling `Cron::run()`. Call this method in your bootstrap file, and you're done!

Advanced Usage
--------------

[](#advanced-usage)

A task can also be an instance of `Cron` that extends `next()` and/or `execute()` as needed. Such a task is configured by calling `Cron::set($name, $instance)`.

If you have access to the system crontab, you can run Cron less (or more) than once every request. You will need to modify the lines where the request is handled in your bootstrap file to prevent extraneous output. The default is:

```
/**
 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
 * If no source is specified, the URI will be automatically detected.
 */
echo Request::instance()
	->execute()
	->send_headers()
	->response;

```

Change it to:

```
if ( ! defined('SUPPRESS_REQUEST'))
{
	/**
	 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
	 * If no source is specified, the URI will be automatically detected.
	 */
	echo Request::instance()
		->execute()
		->send_headers()
		->response;
}

```

Then set up a system cron job to run your application's Cron once a minute:

```
* * * * * /usr/bin/php -f /path/to/kohana/modules/cron/run.php

```

The included `run.php` should work for most cases, but you are free to call `Cron::run()`in any way you see fit.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

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

4028d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/94d3aa2aaa11bbc2228ddae975cba0d3c9d96de3e3e9a35e09736e01180ccc16?d=identicon)[Shimmy](/maintainers/Shimmy)

---

Top Contributors

[![cbandy](https://avatars.githubusercontent.com/u/106560?v=4)](https://github.com/cbandy "cbandy (6 commits)")[![PCGeek-ru](https://avatars.githubusercontent.com/u/9248753?v=4)](https://github.com/PCGeek-ru "PCGeek-ru (1 commits)")[![vansosnin](https://avatars.githubusercontent.com/u/8207551?v=4)](https://github.com/vansosnin "vansosnin (1 commits)")

---

Tags

kohanacron

### Embed Badge

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

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

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[jms/job-queue-bundle

Allows to run and schedule Symfony console commands as background jobs.

3452.3M5](/packages/jms-job-queue-bundle)[contributte/scheduler

PHP job scheduler (cron) with locking

32844.9k1](/packages/contributte-scheduler)[okvpn/cron-bundle

Docker friendly Symfony cron bundle for handle scheduled tasks consistently, parallel or across a cluster, like Symfony Messenger

19506.0k1](/packages/okvpn-cron-bundle)[orisai/scheduler

Cron job scheduler - with locks, parallelism and more

4044.1k5](/packages/orisai-scheduler)[pressbooks/pressbooks-book

This theme is named after Canadian media theorist Marshall McLuhan, who coined the phrase “the medium is the message.” It is designed for academic writing and is also suitable for fiction. Headings are set in Cormorant Garamond, and body type is set in Lora.

206.7k](/packages/pressbooks-pressbooks-book)

PHPackages © 2026

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