18 require_once SQ_CORE_PACKAGE_PATH.
'/system/cron/cron_job/cron_job.inc';
19 require_once SQ_FUDGE_PATH.
'/general/datetime.inc';
20 require_once SQ_FUDGE_PATH.
'/general/file_system.inc';
46 parent::__construct($assetid);
64 require_once SQ_CORE_PACKAGE_PATH.
'/system/system_asset_fns.inc';
65 if (!system_asset_fns_create_pre_check($this)) {
68 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
69 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
71 if ($linkid = parent::create($link)) {
72 if (!system_asset_fns_create_cleanup($this)) {
78 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
80 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
83 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
100 return 'Remove SOAP Response Files Cron Job';
146 $dir_to_check = SQ_DATA_PATH.
'/private/soap_action_file_responses/';
148 if (!is_dir($dir_to_check))
return SQ_CRON_JOB_COMPLETED;
150 $session_dirs = list_dirs($dir_to_check, TRUE);
153 if (empty($session_dirs))
return SQ_CRON_JOB_COMPLETED;
155 if (!self::remove_temp_files($session_dirs))
return SQ_CRON_JOB_ERROR;
157 return SQ_CRON_JOB_COMPLETED;
173 $res = parent::run();
174 if ($res & SQ_CRON_JOB_REMOVE) {
175 $res = $res - SQ_CRON_JOB_REMOVE;
195 foreach ($dirs as $dir) {
197 if (!clear_directory($dir)) {
202 if (!delete_directory($dir)) $success = FALSE;