JsonValueGuard::string(Arr::get($data, 'name')), 'cron_day_of_week' => $dayOfWeek, 'cron_month' => $month, 'cron_day_of_month' => $dayOfMonth, 'cron_hour' => $hour, 'cron_minute' => $minute, 'is_active' => $active, 'only_when_online' => JsonValueGuard::boolean(Arr::get($data, 'only_when_online')), 'next_run_at' => $nextRunAt, ]; if ($schedule->is_active !== $active) { $attributes['is_processing'] = false; } $schedule->update($attributes); return $schedule->refresh(); } }