Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create @Scheduled Annotation #15

Open
RicardoRB opened this issue Dec 17, 2023 · 0 comments
Open

Create @Scheduled Annotation #15

RicardoRB opened this issue Dec 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@RicardoRB
Copy link
Owner

RicardoRB commented Dec 17, 2023

Issue Description

Given the existing @Scheduled annotation in Dart,

When extending the functionality to support advanced scheduling parameters,

Then provide the following enhancements:

  1. Given a cron expression,

    When using the cron parameter,

    Then the scheduled method should execute based on the cron expression, allowing triggers on the second, minute, hour, day of month, month, and day of the week.

  2. Given a fixed delay duration in milliseconds,

    When using the fixedDelay parameter,

    Then the annotated method should execute with a fixed period between the end of the last invocation and the start of the next.

  3. Given a fixed delay duration as a string,

    When using the fixedDelayString parameter,

    Then the annotated method should execute with a fixed period between the end of the last invocation and the start of the next, parsed from the provided string.

  4. Given a fixed rate duration in milliseconds,

    When using the fixedRate parameter,

    Then the annotated method should execute with a fixed period between invocations.

  5. Given a fixed rate duration as a string,

    When using the fixedRateString parameter,

    Then the annotated method should execute with a fixed period between invocations, parsed from the provided string.

  6. Given an initial delay duration in milliseconds,

    When using the initialDelay parameter,

    Then the annotated method should have a delay before the first execution of a fixedRate() or fixedDelay() task.

  7. Given an initial delay duration as a string,

    When using the initialDelayString parameter,

    Then the annotated method should have a delay before the first execution of a fixedRate() or fixedDelay() task, parsed from the provided string.

  8. Given a scheduler type or instance,

    When using the scheduler parameter,

    Then the annotated method should run on the specified scheduler.

  9. Given a TimeUnit enum,

    When using the timeUnit parameter,

    Then the annotated method should use the specified TimeUnit for fixedDelay(), fixedDelayString(), fixedRate(), fixedRateString(), initialDelay(), and initialDelayString().

  10. Given a time zone,

    When using the zone parameter,

    Then the cron expression should be resolved based on the specified time zone.

Expected Behavior

Develop a robust and flexible @Scheduled annotation in Dart that adheres to the given conditions, providing developers with versatile scheduling options. Ensure backward compatibility with the existing @Scheduled annotation if applicable and update documentation with examples and use cases for the new parameters.

Additional Information

Coordinate with the team to ensure alignment with the overall project architecture and coding standards. Update the documentation to reflect the changes and provide clear instructions for implementing the extended @Scheduled annotation.

@RicardoRB RicardoRB added the enhancement New feature or request label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant