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(10y 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 1mo ago

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 32% 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

3981d 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

[jms/job-queue-bundle

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

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

PHP job scheduler (cron) with locking

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

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

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

Cron job scheduler - with locks, parallelism and more

4037.1k4](/packages/orisai-scheduler)[g4/tasker

Application asynchronous tasks manager and runner, cron-like PHP implementation with ability to run tasks with resolution in seconds

1455.1k](/packages/g4-tasker)[bvdputte/kirby-queue

A simple queue utility plugin for Kirby 3. It enables workers in Kirby that can do tasks (in the background) at scheduled intervals (cron) by working through queues of jobs.

314.6k](/packages/bvdputte-kirby-queue)

PHPackages © 2026

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