示例#1
0
文件: job.php 项目: amitjoy/other-php
 /**
  * A method to easily create a job from a crontab definition
  *
  * @param Crontab $crontab
  */
 function createFromCrontab(&$crontab)
 {
     $this->crontabId = $crontab->getId();
     $this->startTimestamp = time();
     $this->code = $crontab->getCronJobCode();
     $this->concurrent = $crontab->getConcurrent();
     $this->implementationId = $crontab->getImplementationId();
 }