|
|
@@ -18,7 +18,7 @@ class CrontabCommand extends Command
|
|
|
public function configure(): void
|
|
|
{
|
|
|
$this->setName('crontab')
|
|
|
- ->addArgument('action', Argument::REQUIRED, 'action')
|
|
|
+ ->addArgument('action', Argument::OPTIONAL, 'action')
|
|
|
->addOption('daemon', 'd', Option::VALUE_NONE, 'daemon mode')
|
|
|
->addOption('grace', 'g', Option::VALUE_NONE, 'graceful shutdown')
|
|
|
->setDescription('Crontab command');
|
|
|
@@ -51,6 +51,11 @@ class CrontabCommand extends Command
|
|
|
{
|
|
|
$this->onWorkerStart = $worker;
|
|
|
}
|
|
|
+
|
|
|
+ public static function getArgv(): array
|
|
|
+ {
|
|
|
+ return self::$argv;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
$worker->setOnWorkerStart(function () {
|