You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def som():
cursor.execute("select Number from demo")
res = cursor.fetchall()
for i in res:
mac.send_message_to("lunch after 15mins",str(i[0]))
@signals.initialized.connect
def notify(entity):
a = str(datetime.date.today())
cursor.execute("select Time from demo")
b = cursor.fetchall()
for i in b:
tm = i[0].strftime("%Y-%m-%d %H:%M")
dy = tm.split(" ")[0].strip()
hr = tm.split(" ")[1].strip()
if dy == a:
schedule.every().day.at(hr).do(som)
while True:
schedule.run_pending()
time.sleep(60)
This function sends the notifications to the user at particular time. If I am using this function bot is not able to give response to the other queries like "hi","help" or any other which I have defined. How can I run both functions in parallel so that bot can send message to the relevant query as well as it will send auto notification to the user.
The text was updated successfully, but these errors were encountered:
def som():
cursor.execute("select Number from demo")
res = cursor.fetchall()
for i in res:
mac.send_message_to("lunch after 15mins",str(i[0]))
@signals.initialized.connect
def notify(entity):
a = str(datetime.date.today())
cursor.execute("select Time from demo")
b = cursor.fetchall()
for i in b:
tm = i[0].strftime("%Y-%m-%d %H:%M")
dy = tm.split(" ")[0].strip()
hr = tm.split(" ")[1].strip()
if dy == a:
schedule.every().day.at(hr).do(som)
This function sends the notifications to the user at particular time. If I am using this function bot is not able to give response to the other queries like "hi","help" or any other which I have defined. How can I run both functions in parallel so that bot can send message to the relevant query as well as it will send auto notification to the user.
The text was updated successfully, but these errors were encountered: