jeudi 27 juin 2019

Laravel Scheduler not working in Dreamhost VPS

enter image description here

Laravel scheduler doesn't work in Dreamhost VPS.

Dreamhost has a limitation of not allowing every minute calls so I am doing it in a 10 minute call instead. However, the scheduler doesn't fire in any case.

I have tried the following cron commands:

php ~/site.com/artisan schedule:run >> /dev/null 2>&1

and

cd / site.com && php artisan schedule:run >> /dev/null 2>&1

But both do not work.

Here's what I have inside my kernel.php

protected $commands = [
    'App\Console\Commands\DailyStatus',
];

/**
 * Define the application's command schedule.
 *
 * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
 * @return void
 */
protected function schedule(Schedule $schedule)
{

    $schedule->command('status:daily')
        ->timezone('Asia/Manila')
        ->dailyAt('6:50');

    $schedule->command('status:daily')
        ->timezone('Asia/Manila')
        ->daily()
        ->between('12:00','12:30')
        ->appendOutputTo(public_path().'status_daily_output.log')
        ->withoutOverlapping(60);

    $schedule->command('status:daily')
        ->timezone('Asia/Manila')
        ->dailyAt('12:15')
        ->appendOutputTo(public_path().'status_daily_at_output.log')
        ->withoutOverlapping(60);
}

The logs are also not being generated. I have put some echo commands and its not firing.

How can I test if my scheduler is properly configured?

Can someone help me fix my current setting?

Thank you.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire