how to schedule task with python using Schedule?

98 views Asked by At

Right now i am trying to do a reminder in python with scheduler. I used the schedule.every().tuesday.at("21:35").do(reminder) method but i want users to input the day and time instead of setting in coding. is there a way to do so? coding:

remind = input("What should i remind about?")

DAY = input("Which Day?")
Time = input("Time?")


schedule.every().(DAY).at(Time).do(print(remind))
while True:
        
    schedule.run_pending()
1

There are 1 answers

0
Aymen On
user_input = input("Enter a date")
# do whatever you want with the input
print(user_input)

You should consider extracting the day and the time from the input. It depends on how you want them.