Пример #1
0
 /**
  * flow
  * - check for cron to run
  */
 public function run_cron()
 {
     //check for cron to run.
     $avycron = new AvyCron();
     if ($runcrons = $avycron->CheckExecute()) {
         foreach ($runcrons as $identifier => $cron) {
             $class = new $cron['class']();
             $functionname = $cron['function'];
             $class->{$functionname}();
             $avycron->Delete($identifier);
             unset($class, $functionname);
         }
     }
 }
Пример #2
0
 public function schedule_stop_coffee_machine($timestamp)
 {
     AvyCron::Set($timestamp, 'CoffeeMaker', 'stop_coffee_machine');
 }