Skip to content

[FEATURE] Adjust task delay duration before first call #115

Open
@lqmanh

Description

@lqmanh

Is your feature request related to a problem? Please describe.
For now, repeat_every decorator only allows us to delay the first call exactly 1 interval with wait_first set to True. We can't do things like wait for 1 minute, then execute the task every 1 hour.

Describe the solution you'd like
Make wait_first accept an int argument.

@repeat_every(seconds=3600, wait_first=60)
def foo():
    """Wait for 60s, then execute this once per hour."""

@repeat_every(seconds=3600, wait_first=True)
def bar():
    """Wait for 1 hour, then execute this once per hour."""

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions