function acquia_spi_cron in Acquia Connector 6
Same name and namespace in other branches
- 6.2 acquia_spi/acquia_spi.module \acquia_spi_cron()
- 7.3 acquia_spi/acquia_spi.module \acquia_spi_cron()
- 7 acquia_spi/acquia_spi.module \acquia_spi_cron()
- 7.2 acquia_spi/acquia_spi.module \acquia_spi_cron()
Implementation of hook_cron().
File
- acquia_spi/
acquia_spi.module, line 28 - 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 = time();
if ($now - $last > $interval) {
acquia_spi_send_profile_info();
variable_set('acquia_spi_cron_last', $now);
}
}