1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- __author__ = "heider"
- __doc__ = r"""
- Created on 8/22/22
- """
- __all__ = []
- import schedule
- import time
- def job():
- print("I'm working...")
- schedule.every(10).seconds.do(job)
- schedule.every(10).minutes.do(job)
- schedule.every().hour.do(job)
- schedule.every().day.at("10:30").do(job)
- schedule.every(5).to(10).minutes.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)
- def job_with_argument(name):
- print(f"I am {name}")
- schedule.every(10).seconds.do(job_with_argument, name="Peter")
- while True:
- schedule.run_pending()
- time.sleep(1)
|