PHP code example of ttree / scheduler

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

    

ttree / scheduler example snippets


class MyTask implements \Ttree\Scheduler\Task\TaskInterface {
	/**
	 * @param array
	 * @return void
	 */
	public function execute(array $arguments = array()) {
		// ...
	}
}

use Ttree\Scheduler\Annotations as Scheduler;
/**
 * @Scheduler\Schedule(expression="* * * * *")
 */
class MyTask implements \Ttree\Scheduler\Task\TaskInterface {
	// ...
}

use Ttree\Scheduler\Annotations as Scheduler;
/**
 * @Scheduler\Meta(description="Describes your task.")
 */