I have a Heroku scheduled job that is supposed to run every 10 minutres. It simply makes a HTTP GET request to a controller's action which does something.
desc "This task is called by the Heroku scheduler add-on"
task :send_notifications => :environment do
response = HTTParty.get('http://sendnotificationapp.com/sms/send_notifications')
end
When I do a rake, the task operates and functions properly:
heroku rake send_notifications
Though when I use the Heroku scheduler GUI to set it to run every 10 minutes, it doesn't operate. Instead I get the following error:
Starting process with command `send_notifications` by [email protected]
Starting process with command `send_notifications`
bash: send_notifications: command not found
Process exited with status 127
Any thoughts?
Thanks!
Reliable delivery Heroku Scheduler is a free add-on, but it doesn't guarantee that jobs will be executed at their scheduled time, or at all for that matter. While it is rare, the possibility that a job may be skipped or run twice does exist.
Quick and easy set up begins by attaching Cron To Go to a Heroku application via the following CLI: A list of all plans available can be found here. After you have provisioned Cron To Go, the dashboard is accessible for your use. You can now get started on defining and scheduling jobs.
Sounds like you set up the Heroku scheduler job to be send_notifications
, rather than rake send_notifications
or bundle exec rake send_notifications
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With