home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (system.cron.js)

This example Drupal source code file (system.cron.js) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

attach, false, function, if, jquery, php, settings, system/run-cron-check

The system.cron.js Drupal example source code

// $Id: system.cron.js,v 1.1 2009/12/15 08:45:32 dries Exp $
(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');


Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal system.cron.js source code file:

new blog posts

"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.