function poormanscron_init in Poormanscron 6.2
Implements hook_init().
File
- ./
poormanscron.module, line 23 - A module which runs Drupal cron jobs without the cron application.
Code
function poormanscron_init() {
if (poormanscron_run_cron_check_access()) {
drupal_add_js(drupal_get_path('module', 'poormanscron') . '/poormanscron.js');
$settings = array(
'basePath' => url('poormanscron'),
'runNext' => variable_get('cron_last', 0) + variable_get('cron_safe_threshold', 10800),
);
drupal_add_js(array(
'cron' => $settings,
), 'setting');
}
}