@@ -473,19 +473,10 @@ The attribute takes more parameters to customize the trigger::
473473 // defines the timezone to use
474474 #[AsCronTask('0 0 * * *', timezone: 'Africa/Malabo')]
475475
476- Arguments/options for Symfony commands are passed as plain string::
477-
478- use Symfony\Component\Console\Command\Command;
479-
480- #[AsCronTask('0 0 * * *', arguments: 'arg --my-option')]
476+ // when applying this attribute to a Symfony console command, you can pass
477+ // arguments and options to the command using the 'arguments' option:
478+ #[AsCronTask('0 0 * * *', arguments: 'some_argument --some-option --another-option=some_value')]
481479 class MyCommand extends Command
482- {
483- protected function configure(): void
484- {
485- $this->addArgument('my-arg');
486- $this->addOption('my-option');
487- }
488- }
489480
490481.. versionadded :: 6.4
491482
@@ -536,19 +527,10 @@ The ``#[AsPeriodicTask]`` attribute takes many parameters to customize the trigg
536527 }
537528 }
538529
539- Arguments/options for Symfony commands are passed as plain string::
540-
541- use Symfony\Component\Console\Command\Command;
542-
543- #[AsPeriodicTask(frequency: '1 day', arguments: 'arg --my-option')]
530+ // when applying this attribute to a Symfony console command, you can pass
531+ // arguments and options to the command using the 'arguments' option:
532+ #[AsPeriodicTask(frequency: '1 day', arguments: 'some_argument --some-option --another-option=some_value')]
544533 class MyCommand extends Command
545- {
546- protected function configure(): void
547- {
548- $this->addArgument('my-arg');
549- $this->addOption('my-option');
550- }
551- }
552534
553535.. versionadded :: 6.4
554536
0 commit comments