Example #1
0
 /**
  * Creates a schedule
  *
  * @ParamType("type", type="string")
  * @ParamType("expression", type="string")
  *
  * @param string $type
  * @param string $expression
  */
 public function createSchedule($type, $expression)
 {
     $this->job->addSchedule(ScheduleBuilder::create($type, $expression));
 }
 public function testCreate()
 {
     $schedule = ScheduleBuilder::create('cron', '* * * * *');
     $this->assertEquals('cron', $schedule->getType());
     $this->assertEquals('* * * * *', $schedule->getExpression());
 }