Forked from pratik-choudhari/schedule_with_schedule.py
Created
October 21, 2021 19:10
-
-
Save giridharmb/108c39d3fa33328df53014bc63a1b664 to your computer and use it in GitHub Desktop.
schedule library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import schedule | |
| import time | |
| def task(): | |
| print("Job Executing!") | |
| # for every n minutes | |
| schedule.every(10).minutes.do(task) | |
| # every hour | |
| schedule.every().hour.do(task) | |
| # every daya at specific time | |
| schedule.every().day.at("10:30").do(task) | |
| # schedule by name of day | |
| schedule.every().monday.do(task) | |
| # name of day with time | |
| schedule.every().wednesday.at("13:15").do(task) | |
| while True: | |
| schedule.run_pending() | |
| time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment