- cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
This Cron will call the Laravel command scheduler every minute. When the schedule:run command is executed, Laravel will evaluate your scheduled tasks and runs the tasks that are due.
I run these codes below in
$schedule->job(new \App\Jobs\done)->everyMinute(); $schedule->command('done:done')->everyMinute();
but none of them worked! so I run the command
php artisan schedule:run but it runs only once and each time I want to make it trigger the job/command I should run that command so I tried to use the command above in Laravel docs. However again it didn't work every minute. So I tried to create a task in
Task Scheduler and run it every 5 minutes(because it didn't have less than 5) now it's working but the usage of
->everyMinute() is redundant because the schedule of Laravel only runs but the main job that is done is by Windows Task Scheduler. So how can I fix it in order not to use cron job nor windows task scheduler?