old_date = date('YmdHis', time() - ($days * 86400)); $output = executeQuery('ncenterlite.deleteNotifyAll', $args); if ($output->toBool()) { echo "Successfully deleted all notifications older than $days days.\n"; $delete_obj = (object)array('regdate' => time()); Rhymix\Framework\Cache::clearGroup('ncenterlite'); Rhymix\Framework\Storage::writePHPData(\RX_BASEDIR . 'files/cache/ncenterlite/new_notify/delete_date.php', $delete_obj); } else { echo "Error while deleting notifications older than $days days.\n"; echo $output->getMessage() . "\n"; $exit_status = 11; } // Set the exit status if there were any errors. if ($exit_status != 0) { exit($exit_status); }