Я пытаюсь объединить эти два кода. Я хочу, чтобы он работал в двух разных циклах .
Например, если я не пишу запись в назначенное время, она должна вывести «Удачи для теста». Я хочу, чтобы запланированное задание действовало независимо.
import schedule
import time
def good_luck():
print("Good Luck for Test")
schedule.every().day.at("00:00").do(good_luck)
while True:
schedule.run_pending()
time.sleep(1)
и
def assistant():
command = input('input: ')
if command == '1':
print('is it one')
else:
print('is not one')
while True:
assistant()
Пример вывода
Good Luck for Test #automatically at specified times
input: 1
is it one
input: 2
is not one
Good Luck for Test #automatically at specified times
Good Luck for Test #automatically at specified times
Good Luck for Test #automatically at specified times
etc.