This script uses the Twilio Python library to send SMS messages. It continuously checks the current time and sends a message when the hour is 13 (1 PM) and the minute is 18. You need to set up your Twilio account and obtain your Account SID, Auth Token, and Twilio phone number before running this script.

Prerequisites:

  • Twilio Account: Obtain your Account SID, Auth Token, and Twilio phone number from Twilio.
  • Python: Install Python on your system.
  • Twilio Python Library: Install the Twilio Python library using pip:

pip install twilio

Set the environment variables TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN to your Twilio Account SID and Auth Token, respectively. You can do this using the following commands:

export TWILIO_ACCOUNT_SID=your_account_sid export TWILIO_AUTH_TOKEN=your_auth_token

Execute the Python script to start the Twilio message scheduler.

python twilio_message_scheduler.py

Ensure that your Twilio account is set up correctly with sufficient funds to send messages and adjust the phone numbers and message content as needed in the script.