Skip to content

Commit e11925c

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: [Scheduler] Add example about how to pass arguments to a Symfony command
2 parents 907ed7e + 35df8ae commit e11925c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scheduler.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
502512
Managing Scheduled Messages
503513
---------------------------
504514

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy