diff --git a/field_redirection.module b/field_redirection.module
index 1ae1b3b..67fb919 100644
--- a/field_redirection.module
+++ b/field_redirection.module
@@ -124,6 +124,20 @@ function field_redirection_http_codes() {
  * If we have a node reference and we can redirect to it lets do it!
  */
 function field_redirection_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  // Don't execute if running via the CLI, e.g. Drush.
+  if (constant('PHP_SAPI') == 'cli') {
+    return;
+  }
+  // Don't execute if the current page is running the normal cron script; this
+  // also supports Elysia Cron.
+  elseif (strpos($_SERVER['PHP_SELF'], 'cron.php') !== FALSE) {
+    return;
+  }
+  // Don't do anything during any MAINTENANCE_MODE.
+  elseif (is_defined('MAINTENANCE_MODE') || variable_get('maintenance_mode', 0)) {
+    return;
+  }
+
   // Make some of the rest of the code simpler.
   $item = !empty($items[0]) ? $items[0] : array();
   $response_code = !empty($display['settings']['code']) ? $display['settings']['code'] : 301;
