Release 1.1

schedule Documentation

Release 1.2.0 Daniel Bader

Apr 10, 2023

Contents

1 Example

3

2 When not to use Schedule

5

3 Read More

7

3.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.3 Run in the background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.4 Parallel execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.5 Timezone & Daylight Saving Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.6 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.7 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.8 Multiple schedulers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.9 Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.10 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.11 Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.12 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4 Issues

31

5 About Schedule

33

Python Module Index

35

Index

37

i

ii

schedule Documentation, Release 1.2.0

Python job scheduling for humans. Run Python functions (or any other callable) periodically using a friendly syntax. ? A simple to use API for scheduling jobs, made for humans. ? In-process scheduler for periodic jobs. No extra processes needed! ? Very lightweight and no external dependencies. ? Excellent test coverage. ? Tested on Python 3.7, 3.8, 3.9, 3.10 and 3.11

Contents

1

schedule Documentation, Release 1.2.0

2

Contents

1 CHAPTER

$ pip install schedule

import schedule import time

def job(): print("I'm working...")

schedule.every(10).minutes.do(job) schedule.every().hour.do(job) schedule.every().day.at("10:30").do(job) schedule.every().monday.do(job) schedule.every().wednesday.at("13:15").do(job) schedule.every().day.at("12:42", "Europe/Amsterdam").do(job) schedule.every().minute.at(":17").do(job)

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

More Examples

Example

3

schedule Documentation, Release 1.2.0

4

Chapter 1. Example

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download