Laravel Scheduled Commands randomly stop running (but scheduled jobs keep working)

392 Views Asked by At

I have scheduled some commands and it randomly stops working. They work for ~10 days and stop randomly, and if I restart the server, they start working again for another ~10 days.

protected function schedule(Schedule $schedule) {

   $schedule->command('dump:database')
                ->hourlyAt(0)
                ->environments(['production'])
                ->thenPing("https://example.com/hash");

   $schedule->command('other:command')
          ->daily();

   $schedule->job(new ECheckScheduleChecks())
        ->daily()
        ->environments(['production']);
}

The weird thing is the scheduled Job keeps running.

Also the ->thenPing() gets triggered even though the code inside the commands does not run.

I don't see any issue in the logs and schedule:run works fine.

This issue is driving me crazy. Any ideas what might be the issue?

0

There are 0 best solutions below