Reputation: 989
I'm using Heroku Scheduler to run a few apps each night. I believe they are what Heroku would call a "worker apps" because they run for about 2 hours each and only need to run once per day. That said, I can't figure out how to change them from being web apps to worker apps?
For context, I'm using the free tier of Heroku.
Upvotes: 0
Views: 982
Reputation: 989
You need to create a file called Procfile in your root.
Found the answer here: https://stackoverflow.com/a/44122238/12020295
So, change your Procfile
to read (with your specific command filled in):
worker: node index.js
and then also run on CLI:
$ heroku scale worker=1
Upvotes: 3