Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 35df8ae

Browse filesBrowse files
committed
Reword
1 parent 4a1d96d commit 35df8ae
Copy full SHA for 35df8ae

File tree

Expand file treeCollapse file tree

1 file changed

+6
-24
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-24
lines changed

‎scheduler.rst

Copy file name to clipboardExpand all lines: scheduler.rst
+6-24Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.