getValue()); if ($expr === '') { throw new LocalizedException(__('Monitor cron schedule cannot be empty.')); } try { $this->scheduleFactory->create()->setCronExpr($expr); } catch (CronException $e) { throw new LocalizedException(__('%1', $e->getMessage()), $e); } return parent::beforeSave(); } }