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

oolongtea's avatar

schedule dont work, command ok, cron job also seem ok?

The crob job seems to run fine every min.

Mar 20 13:02:01 myweb-01 CROND[37653]: (apache) CMD (php /home/web/laravel/artisan schedule:run >> /dev/null 2>&1)
Mar 20 13:03:01 myweb-01 CROND[37658]: (apache) CMD (php /home/web/laravel/artisan schedule:run >> /dev/null 2>&1)
Mar 20 13:04:01 myweb-01 CROND[37663]: (apache) CMD (php /home/web/laravel/artisan schedule:run >> /dev/null 2>&1)
Mar 20 13:05:01 myweb-01 CROND[37692]: (apache) CMD (php /home/web/laravel/artisan schedule:run >> /dev/null 2>&1)
Mar 20 13:06:01 myweb-01 CROND[37697]: (apache) CMD (php /home/web/laravel/artisan schedule:run >> /dev/null 2>&1)

when I add dd($schedule) in Kernel and run schedule:run, i got

Illuminate\Console\Scheduling\Schedule {#51
  #events: array:1 [
    0 => Illuminate\Console\Scheduling\Event {#406
      +command: "'/usr/local/bin/php' 'artisan' email-reminder:review"
      +expression: "*/10 * * * * *"
      +timezone: null
      +user: null
      +environments: []
      +evenInMaintenanceMode: false
      +withoutOverlapping: false
      +runInBackground: false
      #filters: []
      #rejects: []
      +output: "/dev/null"
      #shouldAppendOutput: false
      #beforeCallbacks: []
      #afterCallbacks: []
      +description: null
    }
  ]
}

The command run fine by itself when I use php artisan command.

Do you have any idea what goes wrong?

0 likes
4 replies
Snapey's avatar

anything in your laravel log?

how about sticking some Log::info() statements in there to see if it's being executed

oolongtea's avatar

it's weird that it doesn't like me putting Log:info('running'); I already put

use Log;

I ran command without error message but it doesn't execute. Only if I remove the Log:info and i can run my command.

Schedule is still not working.

Please or to participate in this conversation.