How to setup Laravel 5's task scheduling in Heroku? How to setup Laravel 5's task scheduling in Heroku? heroku heroku

How to setup Laravel 5's task scheduling in Heroku?


I created this Scheduler which runs once a minute and is part of your own app.

https://gist.github.com/robbydooo/65bf341ea0f4081150b945bfb1d38d3c

It creates a new Dyno type called Scheduler which you start one of.

Make sure you run jobs on your queue to avoid this scheduler over running once per minute.

To use this scheduler with Laravel 5.4+ add this file to /app/Console/Commands/RunScheduler.phpRegister this file in app/Console/Kernel.php

protected $commands = […Commands\RunScheduler::class…]

Add this line to your Procfile:

scheduler: php -d memory_limit=512M artisan schedule:cron


Heroku has a cron scheduler addon that you can use for scheduled tasks.

You can install it like this:

$ heroku addons:create scheduler:standard

Have a look at this article for more information.


Cron To Go is an add-on that allows you to run Laravel's task scheduler every minute (* * * * * in cron). Simply install the add-on, add a job with * * * * * as the schedule and php artisan schedule:run as the command, sit back and relax! If your Laravel logs don't show up for the scheduler, there's a quick fix for log routing described here.