getKey() !== $this->getKey()) { throw new \UnexpectedValueException(); } $now = $this->clock->now(); return $cronJobExecution->getLastStart() < $now->sub(new \DateInterval('P1D')) // introduce a random component to ensure a roll when multiple instances are hosted on same machines && 0 === random_int(0, 10); } public function getKey(): string { return 'refresh-materialized-view-address-to-geog-units'; } public function run(array $lastExecutionData): array|null { $this->connection->executeQuery('REFRESH MATERIALIZED VIEW view_chill_main_address_geographical_unit'); return null; } }