*/ class ScheduledJob extends Record { /** Should not be removed. */ protected bool $findLinkedLogCountQueryDisabled = true; public function processValidation(Entity $entity, $data) { parent::processValidation($entity, $data); $scheduling = $entity->get('scheduling'); try { $cronExpression = CronExpression::factory($scheduling); /** @phpstan-ignore-next-line*/ $cronExpression->getNextRunDate()->format('Y-m-d H:i:s'); } catch (Exception $e) { throw new BadRequest("Not valid scheduling expression."); } } }