How to tell whether the current request is part of a cron run?
Implement hook_cron_queue_info() to set a global flag indicating that the current request is part of a cron run.

/**
 * Implements hook_cron_queue_info().
 *
 * hook_cron_queue_info rather than hook_cron, to ensure it executes before
 * any hook_cron implementations.
 */
function mymodule_cron_queue_info() {
  global $mymodule_in_cron;
  $mymodule_in_cron = TRUE;
}


Then, elsewhere in your module, you can check this flag:

global $mymodule_in_cron;
if (!empty($mymodule_in_cron)) {
  return;
}


This works both when invoking cron via the web server and via drush cron.