File tree 1 file changed +10
-0
lines changed
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::
455
455
// defines the timezone to use
456
456
#[AsCronTask('0 0 * * *', timezone: 'Africa/Malabo')]
457
457
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
+
458
463
.. _scheduler-attributes-periodic-task :
459
464
460
465
``AsPeriodicTask `` Example
@@ -499,6 +504,11 @@ The ``#[AsPeriodicTask]`` attribute takes many parameters to customize the trigg
499
504
}
500
505
}
501
506
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
+
502
512
Managing Scheduled Messages
503
513
---------------------------
504
514
You can’t perform that action at this time.
0 commit comments