schedule() public method

Sets the interval for a text_reparser cron task
public schedule ( string $name, integer $interval )
$name string Name of the reparser to schedule
$interval integer Interval in seconds, 0 to disable the cron task
Esempio n. 1
0
 public function test_schedule()
 {
     $this->reparser_manager->schedule('no_reparser', 21);
     $this->assertArrayNotHasKey('no_reparser_cron_interval', $this->config);
     $this->reparser_manager->schedule('another_reparser', 42);
     $this->assertArrayNotHasKey('another_reparser_cron_interval', $this->config);
     $this->reparser_manager->schedule('test_reparser', 20);
     $this->assertEquals(20, $this->config['test_reparser_cron_interval']);
 }