PHP Class mult1mate\crontab\TaskRunner

Author: mult1mate
Show file Open project: MUlt1mate/cron-manager Class Usage Examples

Public Methods

Method Description
checkAndRunTasks ( array $tasks ) Runs active tasks if current time matches with time expression
getRunDates ( string $time, integer $count = 10 ) : array Returns next run dates for time expression
parseAndRunCommand ( string $command ) : mixed Parses given command, creates new class object and calls its method via call_user_func_array
runTask ( mult1mate\crontab\TaskInterface $task ) : string Runs task and returns output

Method Details

checkAndRunTasks() public static method

Runs active tasks if current time matches with time expression
public static checkAndRunTasks ( array $tasks )
$tasks array

getRunDates() public static method

Returns next run dates for time expression
public static getRunDates ( string $time, integer $count = 10 ) : array
$time string
$count integer
return array

parseAndRunCommand() public static method

Parses given command, creates new class object and calls its method via call_user_func_array
public static parseAndRunCommand ( string $command ) : mixed
$command string
return mixed

runTask() public static method

Runs task and returns output
public static runTask ( mult1mate\crontab\TaskInterface $task ) : string
$task mult1mate\crontab\TaskInterface
return string