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