'How to automate sending curl script but 1 variable changes each time from a list
I have a curl script that I want to execute every 5 minutes but I want to change 1 variable each time until it gets to the end and then I want it to stop. (context) I own a small business and one of my suppliers is raising their price 15% but did not give a 30 day notice like normal so I want to notify all customers I have given a quote to so they are aware.
I am looking to figure out first how to send the code every 5 minutes and 2nd only send the value from the list 1 time and then at the end of the list end. (my phone number is the last number in the list so I know it ended)
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxxxxx/Calls.json \
--data-urlencode "To=+<value from list> \
--data-urlencode "From=+15555555555" \
--data-urlencode "Url=https://example.com/OutboundCalls.xml" \
-u 'ACxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxx'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
