diff --git a/forum_access.module b/forum_access.module
index 4b92581..5d55e89 100644
--- a/forum_access.module
+++ b/forum_access.module
@@ -794,3 +794,51 @@ function forum_access_acl_explain($acl_id, $name, $number, $users = NULL) {
   return "ACL (id=$acl_id) grants access to nodes in forum/$number to the listed user(s).";
 }
 
+/**
+ * Implements hook_query_comment_filter_alter().
+ *
+ * Allows cron to index comments on forum topics that aren't accessible to
+ * anonymous users by temporarily granting it the 'bypass node access' permission.
+ */
+function forum_access_query_comment_filter_alter(QueryAlterableInterface $query) {
+  global $user;
+
+  if (!$account = $query->getMetaData('account')) {
+    $account = $user;
+  }
+
+  if (_forum_access_cron_context() && $query->hasTag('node_access') &&
+      !user_access('bypass node access')) {
+    $perm = &drupal_static('user_access');
+    $perm[$account->uid]['bypass node access'] = TRUE;
+  }
+}
+
+/**
+ * Implements hook_domain_cron_queue_info_alter().
+ *
+ * Uses Queue API info alter hook to detect if cron is running.
+ *
+ * @see http://drupal.org/node/1851400
+ */
+function forum_access_cron_queue_info_alter(&$queues) {
+  _forum_access_cron_context(TRUE);
+}
+
+/**
+ * Sets/returns a Boolean representing whether the caller is running in cron context.
+ *
+ * @param $status
+ *   Specify a value to set status, or omit value to retrieve status.
+ *
+ * @return
+ *   Boolean TRUE or FALSE.
+ */
+function _forum_access_cron_context($status = NULL) {
+  $return = &drupal_static(__FUNCTION__, FALSE);
+  if (is_null($status)) {
+    return $return;
+  }
+  $return = $status;
+  return $return;
+}
