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

Drupal example source code file (rules_scheduler.install)

This example Drupal source code file (rules_scheduler.install) 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

array, default, description, not, null, php, scheduled, state, task, the, true, type, varchar

The rules_scheduler.install Drupal example source code

<?php
// $Id: rules_scheduler.install,v 1.1.4.3 2010/08/05 10:48:06 fago Exp $

/**
 * @file
 * Rules Scheduler - Installation file.
 */

/**
 * Implements hook_schema().
 */
function rules_scheduler_schema() {
  $schema['rules_scheduler'] = array(
    'description' => 'Stores scheduled tasks.',
    'fields' => array(
      'tid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => "The scheduled task's id.",
      ),
      'config' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => "The scheduled configuration's name.",
      ),
      'date' => array(
        'description' => 'The Unix timestamp of when the task is to be scheduled.',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'state' => array(
        'type' => 'text',
        'not null' => FALSE,
        'serialize' => TRUE,
        'description' => 'The whole, serialized evaluation state.',
      ),
      'identifier' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => FALSE,
        'description' => 'The user defined string identifying this task.',
      ),
    ),
    'primary key' => array('tid'),
    'indexes' => array('date' => array('date')),
  );
  return $schema;
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal rules_scheduler.install 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.