def refresh_page(): driver.refresh() time.sleep(2) while True: if driver.find_element(By.CLASS_NAME, "mask2").is_displayed() == True: break schedule.every(1).minute.at(":00").do(refresh_page) schedule.run_pending() time.sleep(1) I was expecting it to only run the schedule command once, well it did work when it was not on ":00" seconds but as soon as it hits ":00" it keeps doing the task whenever it’s possible to do so.… Read More Schedule task keeps repeating and never stops
I try to make work schedule table. I have a table like: shift_starts_dt shift_type 2022-01-01 08:00:00 Day 2022-01-01 20:00:00 Night 2022-01-02 08:00:00 Day 2022-01-02 20:00:00 Night 2022-01-03 08:00:00 Day 2022-01-03 20:00:00 Night 2022-01-04 08:00:00 Day 2022-01-04 20:00:00 Night etc.. until the end of the year I can’t figure out how to add repeated values to… Read More How to INSERT repeated values like (a,b,c,d,a,b,c,d….) in DB table?
I am using schedule module to remind me to drink water every ten seconds import schedule def remindDrink(): print("Drink Water") while True: schedule.every().day.at("16:35").do(remindDrink()) So the problem here is that the task gets executed, but immedieately, not at the given time, and VSCode throws a weird error at me Traceback (most recent call last): File "e:\Code\Python… Read More Using schedule module to reming me to drink water every ten seconds