isAttributeChanged('scheduling')) { $jobList = $this->getEntityManager()->getRepository('Job')->where([ 'scheduledJobId' => $entity->id, 'status' => \Espo\Core\CronManager::PENDING ])->find(); foreach ($jobList as $job) { $this->getEntityManager()->removeEntity($job); } } } }