18 require_once SQ_CORE_PACKAGE_PATH.
'/system/cron/cron_job/cron_job_edit_fns.inc';
48 parent::__construct();
68 <table
class=
"sq-backend-table">
70 <!--
Asset to Refresh -->
71 <th
class=
"sq-backend-table-header">
Asset</th>
72 <td
class=
"sq-backend-table-cell"><?php asset_finder($prefix.
'_assetid', 0, Array(
'asset' =>
'D')); ?></td>
75 <!-- Cron Job Schedule -->
76 <th
class=
"sq-backend-table-header">Schedule</th>
77 <td
class=
"sq-backend-table-cell">
81 $edit_fns = $cron_job->getEditFns();
82 echo translate(
'cron_job_refresh_cache_at');
83 $edit_fns->_paintWhenBox($cron_job, $o, $prefix);
86 echo
'<br />'.translate(
'cron_job_regenerate_report_repeat');
116 $edit_fns = $cron_job->getEditFns();
117 $when_oo = $edit_fns->_processWhenBox($cron_job, $o, $prefix);
119 if (empty($_REQUEST[$prefix.
'_assetid'][
'assetid'])) {
123 $assetid = $_REQUEST[$prefix.
'_assetid'][
'assetid'];
127 if ( $_REQUEST[$prefix.
'_when_interval_mins'] ==
'--'
128 && $_REQUEST[$prefix.
'_when_interval_hours'] ==
'--'
129 && $_REQUEST[$prefix.
'_when_interval_days'] ==
'-') {
147 trigger_localised_error(
'CRON0050', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($asset->
type(),
'name'));
153 if (!@$cron_job->setAttrValue(
'when', $when_oo)) {
154 $cron_mgr = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'cron_manager');
155 trigger_localised_error(
'CRON0048', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($asset->
type(),
'name'), easy_datetime($cron_mgr->timeOfNextRun()));
159 $when_oo_str = $cron_job->attr(
'when');
160 $start_time = $cron_job->getNextRun($when_oo_str);
164 $when_ti_arr = explode(
',', $when_ti);
165 $when_ti_arr[0] =
'TI='.$start_time;
166 $when_ti_str = implode(
',', $when_ti_arr);