jeudi 24 décembre 2015

need an expert in laravel task scheduler

I want to know if the task scheduler of laravel forge override the settings in my Kernel Class file because I don't understand which one it will use because I set in the dashboard of laravel forge daily and in my kernel class file a command to run only it's the first of the month like this

$schedule->command('log:demo')->daily()->when(function(){
            if(Carbon::now()->toDateString() == Carbon::now()->startOfMonth()->toDateString())
            {
                return true;
            }
});

I put daily() function here to check everyday if it's the first of the month and I know that it will not be executed if the function doesn't return true but with laravel forge it's executed everyday , I think forge doesn't look at this file



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire