0

I run: php artisan schedule:run I get: INFO No scheduled commands are ready to run.

My routes code is:

<?php

use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Foundation\Scheduling\Schedule;

return function (Schedule $schedule) {
  $schedule->command('command:email:daily')->everyMinute();
};

How to get cron working? I want to run cron every minute?

Regards

1
  • 1
    What version of Laravel are you using? I don't see that type of scheduling code for 12, 11, or 10 Commented Jul 2 at 13:07

1 Answer 1

3

You need to add an entry to the server's cron tab so it can actually run the scheduler.

Run crontab -e and add the entry

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

as stated in the documentation replacing path-to-your-project by the actual path to your project and maybe php by the actual version installed in your server like /usr/bin/php8.2 to avoid problems down the line.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.