So I'm trying to send SMS texts that are being pulled from a list via Twilio to phone numbers. I'm able to to send certain indexed values from the list by specifying the index in the code manually. However, my plan is to run this everyday at a set time via Windows Task Scheduler and perhaps by converting the Python Script to an .exe program. My question is: How am I able to increment the list by one every time the program is ran? Here is My code:
COURSE_QUOTES = ['Day 17: I see no neutral things.',
'Day 18: I am not alone in experiencing the effects of my seeing.',
'Day 19: I am not alone in experiencing the effects of my thoughts.',
'Day 20: I am determined to see.',
'Day 21: I am determined to see things differently.',
'Day 22: What I see is a form of vengeance.',
'Day 23: I can escape from the world I see by giving up attack thoughts.',
'Day 24: I do not perceive my own best interests.',
'Day: 25: I do not know what anything is for.' ]
numbers = ['1111111111', '2222222222', '3333333333']
def send_message(quote_list = COURSE_QUOTES):
account = ("account number")
token = ("tokenID")
client = Client(account, token)
client.messages.create(from_='444-444-4444',
to= numbers,
body=COURSE_QUOTES[0]
)
send_message()