I'm trying to use a Heroku Scheduled Task that makes an HTTP GET to a particular controller's action. Here's what the task looks like:
require 'net/http'
desc "This task is called by the Heroku scheduler add-on"
task :send_notifications => :environment do
Net::HTTP.get("http://testapp.com", "/test/send_notifications")
end
Upon running:
heroku rake send_notifications
I get the following error:
rake aborted!
getaddrinfo: Name or service not known
/app/lib/tasks/scheduler.rake:5:in `block in <top (required)>'
Any thoughts?
Thanks in advance