You are here

function smart_ip_cron in Smart IP 8.2

Same name and namespace in other branches
  1. 8.4 smart_ip.module \smart_ip_cron()
  2. 8.3 smart_ip.module \smart_ip_cron()
  3. 6.2 smart_ip.module \smart_ip_cron()
  4. 6 smart_ip.module \smart_ip_cron()
  5. 7.2 smart_ip.module \smart_ip_cron()
  6. 7 smart_ip.module \smart_ip_cron()

Implements hook_cron().

File

./smart_ip.module, line 114
Determines country, geo location (longitude/latitude), region, city and postal code of the user, based on IP address

Code

function smart_ip_cron() {

  /** @var \Drupal\smart_ip\DatabaseFileEvent $event */
  $event = \Drupal::service('smart_ip.database_file_event');

  // Allow Smart IP source module to act on cron run
  \Drupal::service('event_dispatcher')
    ->dispatch(SmartIpEvents::CRON_RUN, $event);
}