You are here

function acquia_spi_cron in Acquia Connector 7

Same name and namespace in other branches
  1. 6.2 acquia_spi/acquia_spi.module \acquia_spi_cron()
  2. 6 acquia_spi/acquia_spi.module \acquia_spi_cron()
  3. 7.3 acquia_spi/acquia_spi.module \acquia_spi_cron()
  4. 7.2 acquia_spi/acquia_spi.module \acquia_spi_cron()

Implements hook_cron().

File

acquia_spi/acquia_spi.module, line 23
Send site profile information (SPI) and system data to Acquia Network.

Code

function acquia_spi_cron() {
  $last = variable_get('acquia_spi_cron_last', 0);

  // 8 hour interval for sending site profile.
  $interval = variable_get('acquia_spi_cron_interval', 8 * 60 * 60);
  $now = REQUEST_TIME;
  if ($now - $last > $interval) {
    acquia_spi_send_profile_info();
    variable_set('acquia_spi_cron_last', $now);
  }
}