codeigniter4 / tasks
Task Scheduler for CodeIgniter 4
Installs: 50 308
Dependents: 1
Suggesters: 0
Security: 0
Stars: 101
Watchers: 17
Forks: 21
Open Issues: 6
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- codeigniter4/settings: ^2.0
Requires (Dev)
- codeigniter/coding-standard: 1.7.*
- codeigniter4/devkit: ^1.0
- codeigniter4/framework: ^4.1
- phpunit/phpunit: ^9.6
- rector/rector: 1.2.10
This package is auto-updated.
Last update: 2024-12-11 12:20:45 UTC
README
A task scheduler for CodeIgniter 4.
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 <?php namespace Config; use CodeIgniter\Tasks\Config\Tasks as BaseTasks; use CodeIgniter\Tasks\Scheduler; class Tasks extends BaseTasks { /** * Register any tasks within this method for the application. * * @param Scheduler $schedule */ public function init(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.