|
|
Drupal example source code file (poormanscron.js)
The poormanscron.js Drupal example source code// $Id: poormanscron.js,v 1.1.2.3 2010/01/17 00:27:52 davereid Exp $ (function ($) { /** * Checks to see if the cron should be automatically run. */ Drupal.behaviors.cronCheck = function(context) { if (Drupal.settings.cron.runNext || false) { $('body:not(.cron-check-processed)', context).addClass('cron-check-processed').each(function() { // Only execute the cron check if its the right time. if (Math.round(new Date().getTime() / 1000.0) >= Drupal.settings.cron.runNext) { $.get(Drupal.settings.cron.basePath + '/run-cron-check'); } }); } }; })(jQuery); Other Drupal examples (source code examples)Here is a short list of links related to this Drupal poormanscron.js source code file: |
"Drupal" is a registered trademark of Dries Buytaert.
my drupal tutorials and examples
Copyright
1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.
Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.