0
votes

From what I understand in Heroku you can run background processes (workers) and scheduled tasks that run snippets of code. I have a worker process that polls some social networks and checks for new content (it's more complicated that a simple task, so I don't think I can use the scheduler?). Once it's executed it shuts down. Is there a way to schedule my worker process so that it runs every so often? I could add code to the worker process that re-executes the code as soon as it's completed, but I thought that this would increase the amount of time the file is running, and therefore count against my dyno hours? Any help would be greatly appreciated.

1

1 Answers

0
votes

You can certainly use the scheduler addon if you're happy with it executing say every 10 minutes, every hour or every day. Scheduled tasks start their own process which you are billed in addition to any web dyno hours you use.

If you need to be more more frequent than what the scheduler allows you'd need to run a worker which executes your code more often.