/** * Create a new ScheduledCommand in database * * @param $name * @param $command * @param $arguments * @param $cronExpression * @param $logFile * @param $priority * @param $lastExecution * @param bool $locked * @param bool $disabled * @param bool $executeNow * @param integer $lastReturnCode */ protected function createScheduledCommand($name, $command, $arguments, $cronExpression, $logFile, $priority, $lastExecution, $locked = false, $disabled = false, $executeNow = false, $lastReturnCode = null) { $scheduledCommand = new ScheduledCommand(); $scheduledCommand->setName($name)->setCommand($command)->setArguments($arguments)->setCronExpression($cronExpression)->setLogFile($logFile)->setPriority($priority)->setLastExecution($lastExecution)->setLocked($locked)->setDisabled($disabled)->setLastReturnCode($lastReturnCode)->setExecuteImmediately($executeNow); $this->manager->persist($scheduledCommand); $this->manager->flush(); }