Does Heroku Scheduler add-on have a config file? - ruby

I was wondering if Heroku Scheduler add-on for Ruby allows some kind of config file where I can set there what tasks to run and when, the same way that I would do it from the Heroku dashboard.
The reason I want this is because I have a lot of apps (development, staging, production) and I am too lazy to go set the Scheduler configuration for each one.
Thank you!

Unfortunately, no. The Heroku Scheduler add-on can only be configured through the web app.

Related

CloudFormation / Terraform for heroku?

Are there any official (or unofficial) ways of storing entire heroku configurations as code?
I think most heroku configurations can be stored in a bash script. But things like scheduled jobs and the like still have to be performed manually.
Is there any way to store entire app configurations as code so that the setup can be used directly or as a starting point for other applications?
I since learned that you can indeed use terraform with heroku.
Source:
Using Terraform with Heroku

Can I create Heroku Scheduler jobs via the CLI or other non-web UI method?

I'm working on a project which uses Heroku's 'Deploy to Heroku' button to allow people to quickly configure and deploy an app. The app includes a recurring task, and I would like to use Heroku's free 'Scheduler' add-on to run it every day. Ideally I would like the 'setup' task that runs on deploy to create a job in the scheduler, so that the user deploying the app doesn't have to do it.
Is this possible?
As far as I am aware, this is not possible using existing solutions.
I just created a new add-on, https://schedulerctl.com
Schedulerctl enables you to create and manage your Heroku Scheduler jobs using a REST API or the Heroku CLI.
These interfaces allow you to programatically combine Heroku Scheduler with other services like your Heroku button.

Is Heroku Release Phase one-off dyno exposed to the public network?

I want to run GhostInspector (or similar) as part of CI/CD. The tests would execute as part of the release phase for staging, then if successful, production will be deployed. Does this work? Is the dyno publicly accessible with the usual staging url?
short answer: one-off dynos are not publicly accessible to the internet.
For your use-case the way on heroku would be pipelines:
deploy your app to a testing-stage app
run ghost-inspector there
promote to production/staging afterwards
(you can control all this via easy cli or api-requests)
alternative: find a tool that runs headless (inside the dynos) or can be called from the dynos (Browserstack can be used like this in a CI/CD/Pipeline)

How can I set Heroku config vars programmatically from inside the app running on Heroku?

I have an app running on Heroku with a small handful of settings that I want to change from time to time, and I'd like to use Heroku config vars to store these settings so they persist durably.
I know I can modify the settings from the Heroku dashboard or the Heroku CLI, but I'd like to modify them from within the app UI.
I can't seem to figure out how to modify the app's Heroku config from within the app code. If I simply modify the dyno's environment, for example, those changes do not persist to the app's config.
You can use Heroku Platform API for this. Especially this part. There is also a ruby client

Heroku with Play Framework AND Rake

I have a Play Framework app happily running on Heroku. I would like to run some rake tasks to backup the DB (OR, run anything for that matter to back up the db through a cron job on Heroku if there are other suggestions for java apps...).
So far i am striking out getting rake and Play Framework running together in the same app. As soon as I have a Gemfile there, Heroku things i am deploying a Ruby app and doesn't compile/deploy my play app. Appreciate any insights!
The Cron addon is no longer recommended on Heroku. The scheduler add on is recommended instead.
The way the documentation says to use the scheduler add on (if you are not building your apps in Rails) is to use Ruby by calling it from a script file in a bin directory. Check out the documentation here - https://devcenter.heroku.com/articles/scheduler

Resources