layfi-earn/app/process/getcoin/Bitget.php

26 lines
775 B
PHP
Raw Permalink Normal View History

2025-01-27 20:49:47 +08:00
<?php
namespace app\process\getcoin;
use Workerman\Crontab\Crontab;
use app\command\GetcoinBitget;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
class Bitget
{
public function onWorkerStart()
{
new Crontab(env_get('getcoin.bitget.time','0 */30 * * * *'), function(){
echo "===================================\n";
echo date('[Y-m-d H:i:s]')."Getcoin:".__CLASS__." Now Running: \n";
$command = new GetcoinBitget();
$input = new ArrayInput([
2025-01-28 01:48:16 +08:00
'name' => 'Alice',
2025-01-27 20:49:47 +08:00
]);
$output = new ConsoleOutput();
$command->run($input, $output);
echo "===================================\n";
});
}
}