Skip to content

Repository files navigation

CodeIgniter Tasks

A task scheduler for CodeIgniter 4.

PHPUnitPHPStanDeptracCoverage Status

PHPCodeIgniterLicense

Installation

Install via Composer:

composer require codeigniter4/tasks

Migrate the database:

for Unix

php spark migrate -n CodeIgniter\\Settings

for Windows

php spark migrate -n CodeIgniter\Settings

Configuration

Publish the config file:

php spark tasks:publish

Defining tasks

Define your tasks in the init() method:

// app/Config/Tasks.php<?phpnamespaceConfig;
useCodeIgniter\Tasks\Config\TasksasBaseTasks;
useCodeIgniter\Tasks\Scheduler;
class Tasks extends BaseTasks
{
/** * Register any tasks within this method for the application. * * @param Scheduler $schedule */publicfunctioninit(Scheduler$schedule)
{
$schedule->command('demo:refresh --all')->mondays('11:00 pm');
}
}

Docs

Read the full documentation: https://tasks.codeigniter.com

Contributing

We accept and encourage contributions from the community in any shape. It doesn't matter whether you can code, write documentation, or help find bugs, all contributions are welcome. See the CONTRIBUTING.md file for details.

About

Task Scheduler for CodeIgnter 4

Topics

Resources

Contributing

Security policy

Stars

126 stars

Watchers

19 watching

Forks

Releases

Packages

Used by

Contributors

Languages