<?php
 interface vB_Interface_Systemevent_Cronscript { public function __construct(array $nextitem); } abstract class vB_Systemevent_Cronscript implements vB_Interface_Systemevent_Cronscript { use vB_Trait_NoSerialize; protected array $nextitem; public function __construct(array $nextitem) { require_once(DIR . '/includes/functions_cron.php'); $this->nextitem = $nextitem; } public final function run() : void { try { $this->runInternal(); $this->logCompletion(); } catch (Exception $e) { log_cron_exception($e, $this->nextitem, true); } } abstract protected function runInternal() : void; protected function logCompletion() { log_cron_phrase('task_' . $this->nextitem['varname'] . '_log', $this->nextitem, true); } } 