You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add environment variable to turn off recurring jobs #558
We're in the process of migrating an older app form Sidekiq to Solid Queue. We're using Heroku Review apps, and we don't want any recurring jobs to run there. It would be nice if we could completely skip recurring tasks by setting an environment variable.
In searching for a workaround, I found that I could make it work if I added this line to bin/jobs:
(This is of course not the right way to add this, but as a workaround, it's okay.)
Is an option like this something you'd be interested in? I could try to implement it properly, similar to how the SOLID_QUEUE_RECURRING_SCHEDULE environment variable works, and send a PR.
This file is used for Production, Staging, and Review Apps – so the flag would either always be set, or never. The best way to be environment specific in Heroku is … to use environment variables. :D
Activity
rosa commentedon May 9, 2025
Hey @daniel-nerdgeschoss, sure thing! Feel free to open a pull request for this.
I wonder, however, whether it'd be sufficient for you to call
bin/jobslike this:Or do you really need the environment variable rather than the command-line option?
daniel-nerdgeschoss commentedon May 12, 2025
Hey @rosa, thanks for the positive reply! I will take a look when I find the time.
Sadly, adding the flag is not quite sufficient because in Heroku, you can only set one
Procfilefor all environments, which looks like this:This file is used for Production, Staging, and Review Apps – so the flag would either always be set, or never. The best way to be environment specific in Heroku is … to use environment variables. :D