Class Horde_Scheduler_cron

Description

Horde_Scheduler_cron:: Sort of a cron replacement in a PHP cli script.

Date Syntax Examples.

Remember:

  • Whitespace (space, tab, newline) delimited fields
  • Single values, sets, ranges, wildcards
SECOND MINUTE HOUR DAY MONTH * * * * * (every second) 0,30 * * * * (every 30 seconds)
  1. 0,10,20,30,40,50 * * * (every 10 minutes)
  1. 0 * * * (beginning of every hour)
  1. 0 0,6,12,18 * * (at midnight, 6am, noon, 6pm)
  1. 0 0 1-7&Fri * (midnight, first Fri of the month)
  1. 0 0 1-7!Fri * (midnight, first Mon-Thu,Sat-Sun of the month)

Example usage:

Located in /Scheduler/lib/Horde/Scheduler/cron.php (line 49)

Horde_Scheduler
   |
   --Horde_Scheduler_cron
Variable Summary
 mixed $_counter
 mixed $_tasks
Method Summary
 void addTask ( $cmd,  $rules)
 void removeTask ( $uid)
 void run ()
 void runcmd ( &$task)
Variables
mixed $_counter = 1 (line 57)

Every time a task is added it will get a fresh uid even if immediately removed.

mixed $_tasks = array() (line 51)

Inherited Variables

Inherited from Horde_Scheduler

Horde_Scheduler::$_sleep
Horde_Scheduler::$_sleep_adj
Methods
addTask (line 59)
void addTask ( $cmd,  $rules)
  • $cmd
  • $rules
removeTask (line 75)
void removeTask ( $uid)
  • $uid
run (line 89)
void run ()

Redefinition of:
Horde_Scheduler::run()
Main loop/action function.
runcmd (line 112)
void runcmd ( &$task)
  • &$task

Inherited Methods

Inherited From Horde_Scheduler

 Horde_Scheduler::Horde_Scheduler()
 Horde_Scheduler::factory()
 Horde_Scheduler::run()
 Horde_Scheduler::serialize()
 Horde_Scheduler::sleep()
 Horde_Scheduler::unserialize()

Documentation generated on Sun, 30 Jan 2011 05:16:07 +0000 by phpDocumentor 1.4.3