PHP code example of xiaodi / tant
1. Go to this page and download the library: Download xiaodi/tant 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/ */
xiaodi / tant example snippets
class Example
{
public function register()
{
new Crontab('* * * * * *', function () {
echo date('Y-m-d H:i:s') . "\n";
});
}
}
namespace app\command;
class Tasker extends Command
{
protected $tasks = [
Example::class,
];
}