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