I have a program I already wrote to send text messages to a client as a demo, no actual text were sent. Now I need the program to send the texts when it is a specific time of day every day. I have made an excel file with all my clients names, when, they need to be texted and all the other essential information I need to run each of my programs. I'm trying to use a conditional statement that basically says if the current time matches the date in column "Med Time 1", then run the first definition I have which will send the text to start the conversation. I'm having syntax error every time I try anything. This is what I have so far without all the coding for the program I will run since I can't get past the conditional statement. I tried adding a column in the Excel file with the "Current date". That has not worked either. I've been stumped for two weeks.
import pandas as pd
import datetime
#Assign spreadsheet filename
file = 'Uganda_Data.xlsx'
#Load spreadsheet
xl = pd.ExcelFile(file)
#Parse the first sheet
df = xl.parse('Sheet1')
# Medication
if datetime.datetime.now() == df[['Current date','Med Time 1']]