1

I have a Task Scheduling with works if I run the manual command : php artisan word:weeklyUpdate , but this must be done automatilcally on a specific date, so I tried to run * * * * * cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1 but I get Command 'app' not found, did you mean:

Kernel.php

protected function schedule(Schedule $schedule)
{
    $scheduler = new LkpSchedulerUpdateDate;
    $scheduler = $scheduler->first()->toArray();

    $schedule->command('word:weeklyUpdate')->weeklyOn($scheduler['date'], $scheduler['time']);
}

UPDATE: ON sudo php artisan schedule:run I get "No scheduled commands are ready to run."

Beusebiu
  • 1,433
  • 4
  • 23
  • 68

1 Answers1

1

The command for my case was:

 * * * * * php -d register_argc_argv=On /var/www/html/artisan schedule:run >> /dev/null 2>&1
Beusebiu
  • 1,433
  • 4
  • 23
  • 68
  • Its important to note the difference in `cd /some/directory && php artisan` and absolute path to artisan `php /some/directory/artisan` :) – dbf Jul 16 '20 at 14:30