Projet

Général

Profil

Paste
Télécharger (489 octets) Statistiques
| Branche: | Révision:

root / drupal7 / modules / system / system.cron.js @ db2d93dd

1
(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);