File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Bundle/FrameworkBundle/Resources/config Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 221
221
222
222
->set ('console.command.scheduler_debug ' , SchedulerDebugCommand::class)
223
223
->args ([
224
- tagged_locator ('scheduler.schedule_provider ' , 'name ' )
224
+ tagged_locator ('scheduler.schedule_provider ' , 'name ' ),
225
225
])
226
226
->tag ('console.command ' )
227
227
Original file line number Diff line number Diff line change 18
18
use Symfony \Component \Console \Output \OutputInterface ;
19
19
use Symfony \Component \Console \Style \SymfonyStyle ;
20
20
use Symfony \Component \Scheduler \RecurringMessage ;
21
- use Symfony \Component \Scheduler \Schedule ;
22
21
use Symfony \Component \Scheduler \ScheduleProviderInterface ;
23
22
use Symfony \Contracts \Service \ServiceProviderInterface ;
23
+
24
24
use function Symfony \Component \Clock \now ;
25
25
26
26
/**
Original file line number Diff line number Diff line change 21
21
*
22
22
* @experimental
23
23
*/
24
- final class CronExpressionTrigger implements TriggerInterface
24
+ final class CronExpressionTrigger implements TriggerInterface, \Stringable
25
25
{
26
26
public function __construct (
27
27
private CronExpression $ expression = new CronExpression ('* * * * * ' ),
28
28
) {
29
29
}
30
30
31
+ public function __toString (): string
32
+ {
33
+ return "cron: {$ this ->expression ->getExpression ()}" ;
34
+ }
35
+
31
36
public static function fromSpec (string $ expression = '* * * * * ' ): self
32
37
{
33
38
if (!class_exists (CronExpression::class)) {
You can’t perform that action at this time.
0 commit comments