D
D
d999992021-04-27 20:30:52
Laravel
d99999, 2021-04-27 20:30:52

Why doesn't running cron commands through Laravel/Lumen Kernel work?

Code for Lumen:

class Kernel extends ConsoleKernel
{
    protected $commands = [
        ActualizeContractorsListCommand::class,
        ImportCandidatesCommand::class,
        ImportLatestCandidateCommand::class,
    ];

    protected function schedule(Schedule $schedule)
    {
        $schedule->command('contractors:actualize')->dailyAt('22:00');

      $schedule->command('workable:import')->cron('0 */7 * * *');

      $schedule->command('workable:import-latest-candidates')->everyMinute();
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Rudkovsky, 2021-04-27
@AlexRudkowskij

And what was added to the krona schedule itself? Regardless of the settings in the Kernel, it is necessary to configure the cron on the machine, refer to the documentation: Task Scheduling -> Running The Scheduler

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question