Views Display for a query that doesn't display view content to user I need a views display type that will not output content to the user.

Essentially, I've got a view that simply performs a query, and I get the results of the query with views_get_view_result() and then emails the results of the query to a user with a spreadsheet.

It's being run during cron, so I have to turn off access checks for access, or the query displays no results.

Though I could use an alternate access check that ensures the view is being run during cron. Any ideas, Drupalers?
Alright. So here's what I did. I installed Views Access Callback, then created a callback function that checks for the cron key.

The funny thing is, this disables the page URL access for me as user #1, even though I have "access all views" permission, and "Disable SQL rewriting" under Advanced -> Query Settings is turned on, which I would think bypassess access checks, but views_get_view_result() is getting results from the view even when my access function returns false. That's acceptable for me. I need to disable access via a URL.

Here's my implementation

/**
 * Implements hook_views_access_callbacks()
 */
function mycustommodule_rules_views_access_callbacks() {
  $callbacks['mycustommodule_rules_is_cron_view_access'] = t('Is function run from cron');
  return $callbacks;
}

function mycustommodule_rules_is_cron_view_access() {
  if (isset($_GET['cron_key']) &amp;&amp; variable_get('cron_key', 'drupal') == $_GET['cron_key']) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}