PHP code example of daltonmenezes / eventscheduler

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

    

daltonmenezes / eventscheduler example snippets


use EventScheduler\EventScheduler;

$event = new EventScheduler();

$schedule = array("start" => "18-03-2016 23:43");

$schedule = array(
	"start" => "18-03-2016 23:43",
	"finish" => "20-03-2020 19:13"
);

$event->schedule($schedule);

$event->before(function() {
	// define here whatever you want execute as an expected behavior
});

$event->after(function() {
	// define here whatever you want execute as an expected behavior
});

$event->run();