summaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
authorJakob Sack <mail@jakobsack.de>2012-08-09 23:52:48 +0200
committerJakob Sack <mail@jakobsack.de>2012-08-09 23:52:48 +0200
commit831ec985dbdfa4cc401241dd33c59606f9e9b3e9 (patch)
tree77a116a5070b1e70f33530a348180300d122d039 /cron.php
parent7b3c35107d95b3b3ea391e0131ae794411a97128 (diff)
downloadnextcloud-server-831ec985dbdfa4cc401241dd33c59606f9e9b3e9.tar.gz
nextcloud-server-831ec985dbdfa4cc401241dd33c59606f9e9b3e9.zip
Backgroundjobs: fix stupid bug
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/cron.php b/cron.php
index cb01152360b..c52a5035091 100644
--- a/cron.php
+++ b/cron.php
@@ -39,9 +39,11 @@ function handleUnexpectedShutdown() {
$RUNTIME_NOSETUPFS = true;
require_once('lib/base.php');
+// Handle unexpected errors
+register_shutdown_function('handleUnexpectedShutdown');
+
$appmode = OC_Appconfig::getValue( 'core', 'backgroundjobs_mode', 'ajax' );
if( OC::$CLI ){
- register_shutdown_function('handleCliShutdown');
if( $appmode != 'cron' ){
OC_Appconfig::setValue( 'core', 'backgroundjobs_mode', 'cron' );
}
@@ -58,7 +60,6 @@ if( OC::$CLI ){
OC_BackgroundJob_Worker::doAllSteps();
}
else{
- register_shutdown_function('handleWebShutdown');
if( $appmode == 'cron' ){
OC_JSON::error( array( 'data' => array( 'message' => 'Backgroundjobs are using system cron!')));
}