rmTask() public static method

删除任务
public static rmTask ( string $task ) : void
$task string 任务的类名带命名空间
return void
Ejemplo n.º 1
0
 /**
  * 添加一个后台任务
  *
  * @param array $args 传递给命令的参数
  * @param array $options 传递给命令的选项
  *
  * @throws \InvalidArgumentException
  */
 public function execute(array $args, array $options = [])
 {
     if (!isset($args[0])) {
         throw new \InvalidArgumentException('arg action must be input');
     }
     $action = explode('::', $args[0]);
     if (!class_exists($action[0])) {
         throw new \InvalidArgumentException('action not not found!');
     }
     ProcessManage::rmTask($action);
 }