diff --git a/httprl.admin.inc b/httprl.admin.inc
index 6561f81..222ed51 100644
--- a/httprl.admin.inc
+++ b/httprl.admin.inc
@@ -15,6 +15,12 @@ function httprl_admin_settings_form() {
     '#default_value' => variable_get('httprl_server_addr', FALSE),
     '#description' => t('If left blank it will use the same server as the request. If set to -1 it will use the host name instead of an IP address. This controls the output of httprl_build_url_self()'),
   );
+  $form['httprl_background_callback'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable background callbacks'),
+    '#default_value' => variable_get('httprl_background_callback', HTTPRL_BACKGROUND_CALLBACK),
+    '#description' => t(''),
+  );
   $form['timeouts'] = array(
     '#type' => 'fieldset',
     '#title' => t('Default timeouts'),
diff --git a/httprl.module b/httprl.module
index 379f453..c350315 100644
--- a/httprl.module
+++ b/httprl.module
@@ -5,6 +5,11 @@
  */
 
 /**
+ * Default value
+ */
+define('HTTPRL_BACKGROUND_CALLBACK', TRUE);
+
+/**
  * Default maximum number of seconds a single request call may take.
  */
 define('HTTPRL_TIMEOUT', 30.0);
@@ -1853,6 +1858,14 @@ function httprl_queue_background_callback(&$args, &$result = NULL) {
   }
   $counter++;
 
+  // Get URL to call function in background.
+  if (empty($callback_options['url'])) {
+    $url = httprl_build_url_self('httprl_async_function_callback?count=' . $counter);
+  }
+  else {
+    $url = $callback_options['url'];
+  }
+
   // Get options.
   $callback_options = $args[0];
 
@@ -1919,13 +1932,6 @@ function httprl_queue_background_callback(&$args, &$result = NULL) {
     }
   }
 
-  // Get URL to call function in background.
-  if (empty($callback_options['url'])) {
-    $url = httprl_build_url_self('httprl_async_function_callback?count=' . $counter);
-  }
-  else {
-    $url = $callback_options['url'];
-  }
   // Create data array and options for request.
   $options = array(
     'data' => array(
@@ -2319,7 +2325,8 @@ function _httprl_use_proxy($host) {
 /**
  * Returns a persistent variable.
  *
- * This version ignores the $conf global and reads directly from the database.
+ * This version will read directly from the database if value is not in global
+ * $conf variable.
  *
  * Case-sensitivity of the variable_* functions depends on the database
  * collation used. To avoid problems, always use lower case for persistent
@@ -2678,6 +2685,31 @@ function httprl_drupal_full_bootstrap() {
   return $full_bootstrap;
 }
 
+
+/**
+ * Sees if httprl can run a background callback.
+ *
+ * @return Bool
+ *   TRUE or FALSE.
+ */
+function httprl_is_background_callback_capable() {
+  // Check if site is offline.
+  if ((defined('VERSION') && substr(VERSION, 0, 1) >= 7 && httprl_variable_get('maintenance_mode', 0)) || httprl_variable_get('site_offline', 0)) {
+    return FALSE;
+  }
+  // Check that the httprl_background_callback variable is enabled.
+  if (!httprl_variable_get('httprl_background_callback', HTTPRL_BACKGROUND_CALLBACK)) {
+    return FALSE;
+  }
+  // Check that the callback in menu works.
+  if (!menu_get_item('httprl_async_function_callback')) {
+    return FALSE;
+  }
+
+  // All checks passed.
+  return TRUE;
+}
+
 /**
  * Sets the global user to the given user ID.
  *
