PHP code example of buzzingpixel / corbomite-schedule
1. Go to this page and download the library: Download buzzingpixel/corbomite-schedule library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
buzzingpixel / corbomite-schedule example snippets
declare(strict_types=1);
return [
[
'class' => \some\MyClass::class,
'method' => 'someMethod', // Defaults to __invoke,
'runEvery' => 'Day', // Always|FiveMinutes|TenMinutes|ThirtyMinutes|Hour|Day|Week|Month|DayAtMidnight|SaturdayAtMidnight|SundayAtMidnight|MondayAtMidnight|TuesdayAtMidnight|WednesdayAtMidnight|ThursdayAtMidNight|FridayAtMidnight
],
[
'class' => \some\OtherClass::class, // Your class will be retrieved from the Corbomite DI or falls back to new
'runEvery' => 'Day', // You can also specify minutes here
],
];
bash
php app schedule/create-migrations
bash
php app migrate/up
bash
php app schedule/run
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.