Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

5pArxz's avatar
Level 16

Envoyer Heartbeat failing, what's wrong here

So i set up a Heartbeat that checks if my cron is running once a day, however it keeps failing, this is what i've done:

  • Set up Heartbeat
  • Set up Cron to run Scehduler once a minute : Every Minute * * * * * forge php /home/forge/default/current/artisan schedule:run

I also setup my Console/Kernel like this:

<?php namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel {

    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        'App\Console\Commands\Inspire',
        'App\Console\Commands\CheckSubscriptions',
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('tpmsa:check')
                 ->daily()
                 ->thenPing("http://myheartbeat.url");

        $schedule->command('inspire')->everyFiveMinutes();
    }

}

In forge the Scheduler log just says: No scheduled commands are ready to run.

What am i missing ?

0 likes
5 replies
toniperic's avatar

@5pArxz the ->daily() method call sets the expression to:

$this->expression = '0 0 * * * *';

which means

$schedule->command('tpmsa:check')
         ->daily()
         ->thenPing('your-url');

should run tpmsa:check command each day at midnight, and after it finishes then ping to that URL.

Wait for midnight then, or change daily() to dailyAt('12:34') or something else if you want to test it out! :)

5pArxz's avatar
Level 16

@toniperic Thank you for the response, noted that it runs at midnight however heartbeat haven't heard from it in 2 days now, the command tpmsa:check doesn't seem to be called by the scheduler ever.

constb's avatar

@5pArxz Check if cron triggers schedule:run at all. I would place it in forge user personal crontab, not in the main one. Use crontab -e to edit it.

nlogachev's avatar

@5pArxz Please let me know if you've solved the issue. I'm now struggling with the same scenario (but with an everyFiveMinutes() task rather than daily() ...

Please or to participate in this conversation.