stevec
stevec

Reputation: 52268

How can you tell if a scheduled (rake) task is currently running on heroku?

Heroku scheudler tells you when a scheduled rake task was last started, e.g.

enter image description here

Obviously many things can go wrong during a long task (bad code, server issues, the list goes on).

Is there any way to tell if a particular scheduled task is currently running? i.e. not just that it started, but that it's in progress? Is there some way to tell?

Upvotes: 0

Views: 428

Answers (1)

Ben Hull
Ben Hull

Reputation: 7673

Scheduler spins up a one-off dyno when it runs, which will show up under the app's process list with heroku ps and related commands: https://devcenter.heroku.com/articles/one-off-dynos#stopping-one-off-dynos - The process will have a prefix of scheduler (ie. scheduler.1). ps will also return the name of the command being executed, which allows you to differentiate between tasks if required.

Upvotes: 1

Related Questions