8000 [Scheduler] Cannot have multiple #[AsPeriodicTask] on the same method with the same frequency · Issue #52853 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Scheduler] Cannot have multiple #[AsPeriodicTask] on the same method with the same frequency #52853
Closed
@alex-dev

Description

@alex-dev

Symfony version(s) affected

6.4

How to reproduce

Wire a class containing the following into a framework app with scheduler.

#[AsPeriodicTask('PT30M', arguments: ['arg_1'])]
#[AsPeriodicTask('PT30M', arguments: ['arg_2']')]
public function method(string $arg): void {}

Description

Fails to instantiate a Schedule with Duplicated schedule message.
Visibly, they are different tasks, but ServiceCallMessage::__toString() does not consider arguments.

Possible Solution

Serialize args, potentially crc32 them too, into ServiceCallMessage::__toString()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0