52 lines
1.2 KiB
PHP
Executable File
52 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Services\Tg\Hook\Mod;
|
|
|
|
use App\Services\TomTool\Http;
|
|
use App\Services\Cron as ServicesCron;
|
|
use App\Services\Cron\HttpQueue as CronHttpQueue;
|
|
|
|
class Cron extends Base {
|
|
|
|
public function httpQueuePop()
|
|
{
|
|
$r = CronHttpQueue::pop();
|
|
return $r;
|
|
}
|
|
|
|
public function test($aParam)
|
|
{
|
|
$sType = $aParam["aOption"][1] ?? "i";
|
|
$sValue = $aParam["aArg"][1] ?? "03";
|
|
|
|
if (!$sType) {
|
|
return "需要his之一";
|
|
}
|
|
|
|
if (!$sValue) {
|
|
return "需要value";
|
|
}
|
|
|
|
if ($sValue == "?") {
|
|
return "#test__[his] [value]";
|
|
}
|
|
|
|
$oServicesCron = new ServicesCron();
|
|
|
|
$oServicesCron->setTestH('06');
|
|
$oServicesCron->setTestI('10');
|
|
$oServicesCron->setTestS('00');
|
|
|
|
if ($sType == "h") {
|
|
$oServicesCron->setTestH($sValue);
|
|
} else if ($sType == "i") {
|
|
$oServicesCron->setTestI($sValue);
|
|
} else if ($sType == "s") {
|
|
$oServicesCron->setTestS($sValue);
|
|
}
|
|
|
|
return $oServicesCron->run();
|
|
}
|
|
|
|
}
|