File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,11 @@ The attribute takes more parameters to customize the trigger::
455455 // defines the timezone to use
456456 #[AsCronTask('0 0 * * *', timezone: 'Africa/Malabo')]
457457
458+ // when applying this attribute to a Symfony console command, you can pass
459+ // arguments and options to the command using the 'arguments' option:
460+ #[AsCronTask('0 0 * * *', arguments: 'some_argument --some-option --another-option=some_value')]
461+ class MyCommand extends Command
462+
458463.. _scheduler-attributes-periodic-task :
459464
460465``AsPeriodicTask `` Example
@@ -499,6 +504,11 @@ The ``#[AsPeriodicTask]`` attribute takes many parameters to customize the trigg
499504 }
500505 }
501506
507+ // when applying this attribute to a Symfony console command, you can pass
508+ // arguments and options to the command using the 'arguments' option:
509+ #[AsPeriodicTask(frequency: '1 day', arguments: 'some_argument --some-option --another-option=some_value')]
510+ class MyCommand extends Command
511+
502512Managing Scheduled Messages
503513---------------------------
504514
You can’t perform that action at this time.
0 commit comments