Skip to content

Commit

Permalink
Merge branch '7.2' into 7.3
Browse files Browse the repository at this point in the history
* 7.2:
  Reword
  [Scheduler] Add example about how to pass arguments to a Symfony command
  • Loading branch information
javiereguiluz committed Jan 22, 2025
2 parents 05aacc2 + c374d33 commit 8278355
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scheduler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,11 @@ The attribute takes more parameters to customize the trigger::
// defines the timezone to use
#[AsCronTask('0 0 * * *', timezone: 'Africa/Malabo')]

// when applying this attribute to a Symfony console command, you can pass
// arguments and options to the command using the 'arguments' option:
#[AsCronTask('0 0 * * *', arguments: 'some_argument --some-option --another-option=some_value')]
class MyCommand extends Command

.. _scheduler-attributes-periodic-task:

``AsPeriodicTask`` Example
Expand Down Expand Up @@ -499,6 +504,11 @@ The ``#[AsPeriodicTask]`` attribute takes many parameters to customize the trigg
}
}

// when applying this attribute to a Symfony console command, you can pass
// arguments and options to the command using the 'arguments' option:
#[AsPeriodicTask(frequency: '1 day', arguments: 'some_argument --some-option --another-option=some_value')]
class MyCommand extends Command

Managing Scheduled Messages
---------------------------

Expand Down

0 comments on commit 8278355

Please sign in to comment.