scheduleCommand($schedule, 'send:reminders', 'hourly'); $this->scheduleCommand($schedule, 'send:stay_in_touch', 'hourly'); $this->scheduleCommand($schedule, 'monica:calculatestatistics', 'daily'); $this->scheduleCommand($schedule, 'monica:ping', 'daily'); $this->scheduleCommand($schedule, 'monica:clean', 'daily'); if (config('trustedproxy.cloudflare')) { $this->scheduleCommand($schedule, 'cloudflare:reload', 'daily'); // @codeCoverageIgnore } } /** * Define a new schedule command with a frequency. */ private function scheduleCommand(Schedule $schedule, string $command, $frequency) { $schedule->command($command)->when(function () use ($command, $frequency) { $event = CronEvent::command($command); // @codeCoverageIgnore if ($frequency) { // @codeCoverageIgnore $event = $event->$frequency(); // @codeCoverageIgnore } return $event->isDue(); // @codeCoverageIgnore }); } }