| 1 |
|
// $Id$ |
| 2 |
|
|
| 3 |
|
/** |
| 4 |
|
* Checks to see if the cron should be automatically run. |
| 5 |
|
*/ |
| 6 |
|
Drupal.behaviors.cronCheck = function(context) { |
| 7 |
|
if (Drupal.settings.cronCheck || false) { |
| 8 |
|
$('body:not(.cron-check-processed)', context).addClass('cron-check-processed').each(function() { |
| 9 |
|
// Only execute the cron check if its the right time. |
| 10 |
|
if (Math.round(new Date().getTime() / 1000.0) > Drupal.settings.cronCheck) { |
| 11 |
|
$.get(Drupal.settings.basePath + 'poormanscron/run-cron-check'); |
| 12 |
|
} |
| 13 |
|
}); |
| 14 |
|
} |
| 15 |
|
}; |