PHPackages                             buzzingpixel/corbomite-schedule - 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. buzzingpixel/corbomite-schedule

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

buzzingpixel/corbomite-schedule
===============================

Corbomite Schedule

1.2.0(7y ago)02422Apache-2.0PHPPHP &gt;=7.2

Since Jan 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/buzzingpixel/corbomite-schedule)[ Packagist](https://packagist.org/packages/buzzingpixel/corbomite-schedule)[ RSS](/packages/buzzingpixel-corbomite-schedule/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (13)Versions (8)Used By (2)

Corbomite Schedule
==================

[](#corbomite-schedule)

Part of BuzzingPixel's Corbomite project.

Provides a method for scheduling things to run.

Usage
-----

[](#usage)

When you require this into a Corbomite project, the CLI commands and dependency injection config will automatically be set up.

### Installation

[](#installation)

Corbomite Schedule needs to add a database table in order to function. In order to do this, it needs to create some migrations which then need to be run. Run the create-migrations command, which will place migration files in your Corobomite project.

```
php app schedule/create-migrations
```

After running that command, you'll need to run the migrations:

```
php app migrate/up
```

### Running the schedule

[](#running-the-schedule)

In dev, you'll probably just want to run the schedule manually. The command to do that is:

```
php app schedule/run
```

In production you'll want to set it to run on a cron every minute. Here's an example:

```
* * * * * /user/bin/php /path/to/projet/app schedule/run >> /dev/null 2>&1
```

Registering a schedule
----------------------

[](#registering-a-schedule)

Your app or composer package can provide a schedule. To do so, set a `scheduleConfigFilePath` key in the `extra` object of your composer.json:

```
{
    "name": "vendor/name",
    "extra": {
        "scheduleConfigFilePath": "src/scheduleConfig.php"
    }
}
```

The return of your config file path should be an array formatted like this:

```
