How do I set the Laravel scheduler to run a task at a specific time in a certain timezone? The server is set to UTC, but I want to run the task at 12 noon every Monday in the Pacific/Auckland
timezone.
E.g. this will work, but the timezone is UTC:
protected function schedule(Schedule $schedule) {
$schedule->command('run-report')->weekly()->mondays()->at('12:00'));
}
You can do it using timezone() method:
$schedule->command('run-report')->weekly()->mondays()->at('12:00')->timezone('Pacific/Auckland');