I am making an online contest. Every night at 23:59 a winner should be picked using a cronjob in Laravel. When I am using everyminute it works fine. However if i change it to dailyAt('23:59') or cron(59 23 * * *) it doesn't This is my commando to run te cronjob:
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
$schedule->command('pick:winner')->everyMinute(); //we should use dailyAt but this is not working;
}
Apparently there was something wrong with the timezone, I live in Belgium. So everything excecuted 2 hours earlier. So I had to set my cronjobs differently.
dailyAt('21:59')//does cronjob at 23:59