PHP code example of iicn / schedule

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

    

iicn / schedule example snippets


$schedule->command('scheduler:run-command')->everyMinute();



use IICN\Schedule\ScheduleBuilder;

class TestRunSchedule extends ScheduleBuilder
{

    public function __construct($arg1, $arg2) {
    
    }
    public function run()
    {
        // TODO: Implement run() method.
    }
}

use IICN\Schedule\TaskScheduler;

TaskScheduler::do(TestRunSchedule::class, [$arg1, $arg2])->at('2024-02-02 20:28', "UTC");

use IICN\Schedule\TaskScheduler;

TaskScheduler::do(TestRunSchedule::class, [$arg1, $arg2])->at('2024-02-02 20:28', ["UTC", "Tehran"]);

use IICN\Schedule\TaskScheduler;

TaskScheduler::do(TestRunSchedule::class, [$arg1, $arg2])->at('2024-02-02 20:28');