author | ymh <ymh.work@gmail.com> |
Tue, 20 Mar 2018 15:02:40 +0100 | |
changeset 573 | 25f3d28f51b2 |
parent 541 | e756a8c72c3d |
permissions | -rwxr-xr-x |
(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);