Send Scheduled SMS in Python - Python Automation


import schedule
import requests

def send_auto_message():
      resp = requests.post('https://textbelt.com/text', {
      'phone': "yourPhoneNumber",
      'message': 'Your message goes here',
      'key': "YourAPIKey"})
      print(resp.json()) # prints the status
      
# send_auto_message()

# the task is scheduled for everyday in the morning at 6:00
schedule.every().day.at("06:00").do(send_auto_message)

# practice schedule with a simple function
def this():
      print("I am the scheduled task.")

schedule.every(2).seconds.do(this)
while True:
      schedule.run_pending()
   

    

Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

The Basic Structure of a Full-Stack Web App

Unlocking Web Design: A Guide to Mastering CSS Layout Modes