An open API service indexing awesome lists of open source software.

https://github.com/mic1on/cron-schedule

一个基于cron表达式的定时任务调度
https://github.com/mic1on/cron-schedule

Last synced: 11 months ago
JSON representation

一个基于cron表达式的定时任务调度

Awesome Lists containing this project

README

          

# cron-schedule


Package version


Supported Python versions

## Installation

```bash
pip install cron-schedule
```

## Usage

```python
from datetime import datetime
import time

from schedule import schedule

def do_some_job():
print('do_some_job...', datetime.now())

schedule.add_job(do_some_job, "* * * * * 15,25")

while True:
schedule.run_pending()
time.sleep(1)
```

```text
do_some_job... 2022-09-23 15:35:15.152107
do_some_job... 2022-09-23 15:35:25.193932
```

#### thanks

- [croniter](https://github.com/kiorky/croniter)