Created
June 10, 2018 16:08
-
-
Save b1tg/0caeced610bc3ae2c8a80a7fb708e900 to your computer and use it in GitHub Desktop.
[定时调用] schedule库
This file contains 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 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) | |
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