Method | Description | |
---|---|---|
editTask ( mult1mate\crontab\TaskInterface $task, string $time, string $command, string $status = TaskInterface::TASK_STATUS_ACTIVE, string $comment = null ) : mult1mate\crontab\TaskInterface | Edit and save TaskInterface object | |
getTaskCrontabLine ( mult1mate\crontab\TaskInterface $task, string $path, string $php_bin, string $input_file ) : string | Formats task for export into crontab file | |
parseCommand ( string $command ) : array | Parses command and returns an array which contains class, method and arguments of the command | |
parseCrontab ( string $cron, mult1mate\crontab\TaskInterface $task_class ) : array | Parses each line of crontab content and creates new TaskInterface objects | |
validateCommand ( string $command ) : string | false | Checks if the command is correct and removes spaces |
Method | Description | |
---|---|---|
createTaskWithCrontabLine ( mult1mate\crontab\TaskInterface $task_class, array $matches, string $comment ) : mult1mate\crontab\TaskInterface | Creates new TaskInterface object from parsed crontab line |
public static editTask ( mult1mate\crontab\TaskInterface $task, string $time, string $command, string $status = TaskInterface::TASK_STATUS_ACTIVE, string $comment = null ) : mult1mate\crontab\TaskInterface | ||
$task | mult1mate\crontab\TaskInterface | |
$time | string | |
$command | string | |
$status | string | |
$comment | string | |
return | mult1mate\crontab\TaskInterface |
public static parseCommand ( string $command ) : array | ||
$command | string | |
return | array |
public static parseCrontab ( string $cron, mult1mate\crontab\TaskInterface $task_class ) : array | ||
$cron | string | |
$task_class | mult1mate\crontab\TaskInterface | |
return | array |
public static validateCommand ( string $command ) : string | false | ||
$command | string | |
return | string | false |