You are here

function elysia_cron_schema in Elysia Cron 6.2

Same name and namespace in other branches
  1. 6 elysia_cron.install \elysia_cron_schema()
  2. 7.2 elysia_cron.install \elysia_cron_schema()
  3. 7 elysia_cron.install \elysia_cron_schema()

File

./elysia_cron.install, line 3

Code

function elysia_cron_schema() {
  $schema['elysia_cron'] = array(
    'fields' => array(
      'name' => array(
        'type' => 'varchar',
        'length' => 120,
        'not null' => TRUE,
      ),
      'disable' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => FALSE,
      ),
      'rule' => array(
        'type' => 'varchar',
        'not null' => FALSE,
        'length' => 32,
      ),
      'weight' => array(
        'type' => 'int',
        'not null' => FALSE,
      ),
      'context' => array(
        'type' => 'varchar',
        'not null' => FALSE,
        'length' => 32,
      ),
      'running' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'last_run' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'last_aborted' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'abort_count' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'last_abort_function' => array(
        'type' => 'varchar',
        'length' => 32,
        'no export' => TRUE,
      ),
      'last_execution_time' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'execution_count' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'avg_execution_time' => array(
        'type' => 'float',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'max_execution_time' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'last_shutdown_time' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
    ),
    'primary key' => array(
      'name',
    ),
    'export' => array(
      'key' => 'name',
      'key name' => 'Cron job name',
      'primary key' => 'name',
      'identifier' => 'cron_rule',
      'object factory' => 'elysia_cron_ctools_export_object_factory',
      'load callback' => 'elysia_cron_ctools_export_load',
      'load all callback' => 'elysia_cron_ctools_export_load_all',
      //'save callback' => 'elysia_cron_ctools_export_save',
      'export callback' => 'elysia_cron_ctools_export_callback',
      //'import callback' => 'elysia_cron_ctools_import_callback',
      'to hook code callback' => 'elysia_cron_ctools_to_hook_code',
      'default hook' => 'default_elysia_cron_rules',
      'api' => array(
        'owner' => 'elysia_cron',
        'api' => 'default_elysia_cron_rules',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
  );
  return $schema;
}