cms/drupal/modules/system/system.cron.js
changeset 541 e756a8c72c3d
equal deleted inserted replaced
540:07239de796bb 541:e756a8c72c3d
       
     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);