Thariq Shihipar
Thariq Shihipar

Reputation: 1082

Heroku Getting Cron Logs

I've got a (free) cronjob running on a Heroku app and I'm trying to get the logs as they ran, but there doesn't seem to be any easy way to get the most recent logs of a cronjob.

On the heroku website it says heroku logs --ps cron.1

But it seems like each cron instance creates a new process, it's now at cron.51. Running heroku logs --ps cron.51 works, but I don't want to have to keep track of the numbers.

Is there a way to get the logs of the most recent cronjob run?

Thanks!

Upvotes: 0

Views: 281

Answers (1)

leonardoborges
leonardoborges

Reputation: 5629

You can run heroku logs --ps cron.

That way you get a consolidated log of all cron processes as opposed to one with a specific id.

Upvotes: 5

Related Questions