Tweeting NYC ASP info daily at 7:30 AM, 4 PM, & during emergency suspensions. Account is automated and will not respond
Inspired by this article I decided to create a minimalistic and simple solution in Ruby. And here there is!
When there in no need to move your car, you will get the text message!
Setuping the notifier on Heroku will allow you to fully automate it. Notifier will be triggered everyday at the same time of the day and text message will be sent to you if needed.
- Start with clicking Heroku Deploy Button:
- You will be asked to set:
- Click
Deploy App
button. - Click
Manage App
button. - Go to
Heroku Scheduler
settings:
- Create a new job.
- Set the schedule to run in preferably once per day, for example in the evening (remember, it's UTC).
- As running command type:
ruby notifier.rb
- Save new job
- Everything should be set and working. Optionally:
- You can check logs after job is triggered. (requirement: Heroku CLI installed)
- run:
heroku logs --ps scheduler -a your-app-name -t
- this will print logs to your terminal and tail them.
If you don't want to deploy it to Heroku you can run it manually on your local machine.
twitter_api:
api_key: api-key
api_secret_key: api-secret-key
access_token: access-token
access_secret_token: access-secret-token
twilio:
account_sid: account-sid
auth_token: auth-token
from_number: from-number
to_number: to-number
You can start by copying the secrets.yml
file:
cp secrets.example.yml
Following command will fetch Docker base image, build app's new Docker image and run ruby command inside of it:
make run
ruby notifier.rb