diff --git a/telegram_bot/bot_updates.py b/telegram_bot/bot_updates.py index e729e8a..5467aad 100644 --- a/telegram_bot/bot_updates.py +++ b/telegram_bot/bot_updates.py @@ -78,13 +78,29 @@ def update_crontab(pCurrent_Time): def update_based_on_crontab(pCurrent_Time): current_time_ctime = time.ctime() + + if str(current_time_ctime).split(' ')[0] == "Mon": + current_day = 0 + elif str(current_time_ctime).split(' ')[0] == "Tue": + current_day = 1 + elif str(current_time_ctime).split(' ')[0] == "Wed": + current_day = 3 + elif str(current_time_ctime).split(' ')[0] == "Thu": + current_day = 4 + elif str(current_time_ctime).split(' ')[0] == "Fri": + current_day = 5 + elif str(current_time_ctime).split(' ')[0] == "Sat": + current_day = 6 + elif str(current_time_ctime).split(' ')[0] == "Sun": + current_day = 7 + else: + print('Error with time code') + sys.exit(-1) + for i in range(len(user_crontab)): print('tbd') - time.sleep(60) - - def send_to_user(pText, pUser_id = 1770205310):