Code-Society-Lab / Code-Society-Lab/matrixpy

Scheduler: Add `unschedule` method

Open
#71 1 comment 0 reactions 1 assignee Claimed by @Shouryaverma19 View on GitHub
good first issue
Dominant language
Python
Stars
14
Forks
7
Avg merge
8d 19h
Merged PRs (30d)
5

Description

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

### Proposed API
```python
def unschedule(self, name: str) -> None
```

### Example
```python
bot.scheduler.unschedule("morning_update")
```

### Before opening a PR
- Write unit tests
- Run `mypy matrix/`
- Run `pytest tests/`
- Run `black .`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.