summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 598849907..bdf3d1867 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2502,10 +2502,11 @@ function page_set_cache() {
* Returns TRUE if ran successfully
*/
function drupal_cron_run() {
- // If not in 'safe mode', increase the maximum execution time:
- if (!ini_get('safe_mode')) {
- set_time_limit(240);
- }
+ // Allow execution to continue even if the request gets canceled.
+ @ignore_user_abort(TRUE);
+
+ // Increase the maximum execution time.
+ @set_time_limit(240);
// Fetch the cron semaphore
$semaphore = variable_get('cron_semaphore', FALSE);