18 require_once SQ_CORE_PACKAGE_PATH.
'/system/cron/cron_job/cron_job.inc';
43 parent::__construct($assetid);
60 return 'Clear Matrix Cache Cron Job #'.$this->attr(
'ownerid');
79 $assetid = Array($this->
attr(
'ownerid'));
81 'assetid' => $assetid,
82 'level' => $this->
attr(
'level'),
83 'type_codes' => $this->
attr(
'type_codes'),
85 'repopulate' => $this->
attr(
'repopulate'),
88 $hh = $GLOBALS[
'SQ_SYSTEM']->getHipoHerder();
89 $status_errors = $hh->freestyleHipo(
'hipo_job_clear_cache', $vars);
90 if (empty($status_errors)) {
91 $asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset(isset($assetid[0]) ? $assetid[0] : NULL);
92 $GLOBALS[
'SQ_SYSTEM']->am->forgetAsset($asset);
94 if ($this->
attr(
'type') ==
'one_off') {
96 return SQ_CRON_JOB_COMPLETED | SQ_CRON_JOB_REMOVE;
97 }
else if ($this->
attr(
'type') ==
'repeating') {
99 return SQ_CRON_JOB_COMPLETED;
103 trigger_localised_error(
'CRON0057', E_USER_WARNING);
107 return SQ_CRON_JOB_ERROR | SQ_CRON_JOB_REMOVE;
121 $cm = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'cron_manager');
122 return $cm->getJobs(
'cron_job_clear_matrix_cache');