Skip to content

Scheduler: Add unschedule method #71

Description

@PenguinBoi12

Jobs registered with schedule() can't be removed at runtime. This is needed for bots that conditionally disable scheduled tasks.

Proposed API

def unschedule(self, name: str) -> None

Example

bot.scheduler.unschedule("morning_update")

Before opening a PR

  • Write unit tests
  • Run mypy matrix/
  • Run pytest tests/
  • Run black .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions