1. Go to this page and download the library: Download mattmezza/scheduled-job 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/ */
mattmezza / scheduled-job example snippets
class MyTask extends TaskStandard {
public function getDescriptionString(): string
{
return 'Task description';
}
public function run(array $allParam)
{
// do something
}
}
class MyJob extends JobStandard {
public function getDescriptionString(): string
{
return 'Job description';
}
public function getAllTask(): array
{
return [
new MyTask(),
];
}
}
(new JobExecutorStandard())->execute($job, $argv]);