May-04-2021, 07:07 AM
Not sure if this is what you want
import schedule, time from datetime import datetime def my_task(): custom_time = datetime(2021, 5, 1, 17, 30, 29, 431717) now = datetime.now() print(f'Custom Time:{custom_time} Current Time: {now} Time Difference: {custom_time-now}') schedule.every(1).minutes.do(my_task) while True: schedule.run_pending() time.sleep(1)
Output:Custom Time:2021-05-01 17:30:29.431717 Current Time: 2021-05-04 02:06:31.249154 Time Difference: -3 days, 15:23:58.182563
Custom Time:2021-05-01 17:30:29.431717 Current Time: 2021-05-04 02:07:31.312671 Time Difference: -3 days, 15:22:58.119046
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags