1. Go to this page and download the library: Download snanword/task_tools 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/ */
snanword / task_tools example snippets
namespace SnanWord\TaskTool\task;
use SnanWord\TaskTool\basis\TaskAbstract;
class AutoReceiptTask extends TaskAbstract
{
/**
* run
* @des task run code
* @return mixed|void
* @author Snan
*/
public function run()
{
// TODO: Implement run() method.
var_dump('hello-word');
}
/**
* setCrontab
* @des setting crontab rule
* @return array
* @author Snan
*/
public function setCrontab()
{
return ['*','0','*','*','*'];//[Minute, hour, day, month, week]
}
}
php vendor/snanword/task_tools/src/bin/snantask.php init
After the initialization is complete, the snantask.php file will be generated in the root directory of your project
$xslt
php snantask.php stop //Close all
php snantask.php stop {your task} //Close one
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.