parameters: (payload)
docstring: Send SMS via Twilio.
docstring_summary: Send SMS via Twilio.
docstring_tokens: Send SMS via Twilio .
function: def send_sms(payload):
  
      """
      Send SMS via Twilio.
      """
  
      if not TWILIO_CONFIG:
          return
  
      client = TwilioRestClient(TWILIO_CONFIG.account_sid, TWILIO_CONFIG.auth_token)
  
      def perform_request():
  
          global last_sms
  
          if datetime.utcnow() - last_sms > timedelta(minutes=1):
              pass
  
          client.messages.create(
              body=payload,
              to=TWILIO_CONFIG.inbound_number,
              from_=TWILIO_CONFIG.outbound_number
          )
  
          print("Sent SMS message.")
  
          last_sms = datetime.utcnow()
  
      SCHEDULER.add_job(perform_request)
function_tokens: def send_sms ( payload ) : if not TWILIO_CONFIG : return client = TwilioRestClient ( TWILIO_CONFIG . account_sid , TWILIO_CONFIG . auth_token ) def perform_request ( ) : global last_sms if datetime . utcnow ( ) - last_sms > timedelta ( minutes = 1 ) : pass client . messages . create ( body = payload , to = TWILIO_CONFIG . inbound_number , from_ = TWILIO_CONFIG . outbound_number ) print ( "Sent SMS message." ) last_sms = datetime . utcnow ( ) SCHEDULER . add_job ( perform_request )