Python code
Posted: May 08 2022, 20:15
I need a couple of programs in python. First one is very simple. Just need to print a msg at the same time Monday -Friday. Second is a little more complex. Wondering if anyone can help. TIA
Connect with CB radio enthusiasts at CB Radio Talk Forum. Fuel your knowledge, unlock secrets, and engage in discussions. Join a vibrant community of like-minded individuals and explore the exciting realm of CB radios.
https://www.cbradiotalk.com/
Code: Select all
pip install schedule
Code: Select all
import schedule
import time
from datetime import datetime
def job():
print("This is your scheduled message.")
# Schedule the job to run at the same time Monday to Friday
schedule.every().monday.at("10:00").do(job)
schedule.every().tuesday.at("10:00").do(job)
schedule.every().wednesday.at("10:00").do(job)
schedule.every().thursday.at("10:00").do(job)
schedule.every().friday.at("10:00").do(job)
# Keep the script running
while True:
schedule.run_pending()
time.sleep(1)