CREATE TABLE IF NOT EXISTS `cron_jobs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(250) DEFAULT NULL,
  `command` varchar(500) NOT NULL,
  `schedule` varchar(250) NOT NULL,
  `status` enum('Enabled','Disabled') NOT NULL DEFAULT 'Enabled',
  `state` enum('Pending','Working','Ready', 'Error') NOT NULL DEFAULT 'Ready',
  `type` enum( 'One-off', 'Recurrence' ) NOT NULL DEFAULT 'Recurrence',
  `created` datetime DEFAULT NULL,
  `updated` datetime DEFAULT NULL,
  `lastexec` datetime DEFAULT NULL,
  `nextexec` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `nextexec` (`module`),
  KEY `status` (`status`),
  KEY `type` (`type`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `cron_jobs_i18n` (
  `id` int(11) NOT NULL,
  `title` varchar(250) NOT NULL,
  `abstract` varchar(250) NULL,
  `locale` varchar(5) NOT NULL DEFAULT 'en_US',
   KEY `id` (`id`),
   KEY `locale` (`locale`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
