PHP code example of fimaruf / recurring-task-scheduler

1. Go to this page and download the library: Download fimaruf/recurring-task-scheduler 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/ */

    

fimaruf / recurring-task-scheduler example snippets


[
    ...
    'providers' => [
        ...
        \CroudTech\RecurringTaskScheduler\RecurringTaskSchedulerServiceProvider::class,
        ...
    ],
    ...
]

class Task extends Model {
    public function recurringTaskScheduleCallback(\CroudTech\RecurringTaskScheduler\ScheduleEvent $schedule_event) : boolean
    {
        try {
            ...do something here...
            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
}