blob: 01809b096e59ed4760b25f3e8d2f33dc88249b89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// $Id$
(function ($) {
/**
* Checks to see if the cron should be automatically run.
*/
Drupal.behaviors.cronCheck = {
attach: function(context, settings) {
if (settings.cronCheck || false) {
$('body').once('cron-check', function() {
// Only execute the cron check if its the right time.
if (Math.round(new Date().getTime() / 1000.0) > settings.cronCheck) {
$.get(settings.basePath + 'system/run-cron-check');
}
});
}
}
};
})(jQuery);
|