-
Notifications
You must be signed in to change notification settings - Fork 34
classes_tasks_wdfcrontask.class
Entrypoint for a central cron handler.
To use this implement your own 'cron' class extenting from WdfCronTask and
implement the 'Process' method. It receives the interval in minutes
that triggered the current run.
Then crontab -e
and add a minutley call to the task like this:
cd /your/docroot && php index.php yourcronclassname
Note that in (difference to cron) this will not run each fill X minutes, but each X minutes. Next run will be scheduled after current run is over, so running a long task hourly will result in more and more shifting away from the complete hour.
Extends: Task
Subclass must implement: Main-Loop
Definition: public abstract function Process($interval)
Returns: void
Parameters:
-
int $interval
Interval this loop is called for (1,5,10,15,30,45,60 minutes)
INTERNAL WdfCronTask main loop, creates sub-tasks
INTERNAL WdfCronTask sub-tasks main loop
Prints status about cron tasks.
Definition: public function Status($args)
Returns: void
Parameters:
-
mixed $args
Unused
Manually triggers cron intervals.
// Syntax: wdfcron-trigger (1|5|10|15|30|45|60)
Definition: public function Trigger($args)
Returns: void
Parameters:
-
mixed $args
CLI args