Commit b310c7aa authored by Carsten  Rose's avatar Carsten Rose
Browse files

autocron.php: print error to stdout

formEditor.sql: udpate some comments to form 'cron'.
parent d9ea3973
......@@ -23,3 +23,7 @@ try {
$answer[API_MESSAGE] = "Generic Exception: " . $e->getMessage();
}
if (!empty($answer[API_MESSAGE])) {
echo $answer[API_MESSAGE];
}
......@@ -170,11 +170,11 @@ CREATE TABLE IF NOT EXISTS `Period` (
# Delete previous FormElements (if exist)
DELETE FormElement FROM FormElement, Form
WHERE
(Form.name LIKE 'form' OR Form.name LIKE 'formElement' OR Form.name LIKE 'copyForm') AND Form.id = FormElement.formId;
FIND_IN_SET(Form.name, 'form,formElement,copyForm,cron') > 0 AND Form.id = FormElement.formId;
# Delete previous Forms (if exist)
DELETE FROM Form
WHERE name LIKE 'form' OR name LIKE 'formElement' OR name LIKE 'copyForm';
WHERE name LIKE 'form' OR name LIKE 'formElement' OR name LIKE 'copyForm' OR name LIKE 'cron';
#
# FormEditor: Form
......@@ -428,4 +428,30 @@ CREATE TABLE IF NOT EXISTS `Cron` (
AUTO_INCREMENT = 0
DEFAULT CHARSET = utf8;
# Form: Cron
INSERT INTO Form (id, name, title, tableName, parameter)
VALUES
(4, 'cron', 'cron {{SELECT IF("{{r}}" = "0", "(new)", "(Id: {{r}})") }}', 'Cron', '');
# FormElements: CopyForm
INSERT INTO FormElement (formId, name, label, mode, modeSql, type, encode, checkType, ord, parameter, size, note)
VALUES
(4, 'status', 'Enabled', 'show', '', 'checkbox', 'specialchar', 'alnumx', 10, '', '', ''),
(4, 'type', 'Type', 'show', '', 'radio', 'specialchar', 'alnumx', 20, 'buttonClass=btn-default', '', ''),
(4, 'nextRun', 'Next run', 'show', '', 'text', 'specialchar', 'alnumx', 30, '', '',
'<p>Cronjob will be started if specified timestamp is over. If timestamp=0: Job will never be started</p>\r\n<p>Every time the jobs runs, this timestamp will be increased automatically by&nbsp;''frequency`.</p>'),
(4, 'frequency', 'Frequency', 'show', '', 'text', 'specialchar', 'alnumx', 40, '', '',
'<p>Repeat AutoCron-job with the specified interval. If empty: no repeating.</p>\r\n<p>E.g.: "1 DAY", "15 MINUTE'', "6 MONTH" - used directly in SQL-Function "DATE_ADD(&lt;nextrun&gt;, INTERVAL &lt;frequency&gt;)"&nbsp;</p>'),
(4, 'comment', 'Comment', 'show', '', 'text', 'specialchar', 'allbut', 50, '', '',
'<p>Name/Description of cronjob</p>'),
(4, 'sql1', 'Mail', 'show', '', 'text', 'none', 'all', 60, '', '60,4',
'Query: &#123;&#123;!SELECT ... as sendMailTo...&#125;&#125;<br><b>sendMailTo / sendMailCc / sendMailBcc</b>: Separate multiple by comma.<br><b>sendMailFrom</b><br><b>sendMailSubject</b><br><b>sendMailReplyTo</b>: Optional<br><b>sendMailFlagAutoSubmit</b>: Optional. on|off. Default on - if "on", suppresses OoO answers from receivers.<br><b>sendMailGrId</b>: Optional<br><b>sendMailXId</b>: Optional'),
(4, 'content', 'Content', 'show', '', 'text', 'none', 'all', 70, '', '40,4',
'<p>Website: URL<br>Mail: Static Body or &#123;{SELECT ...&#125;}</p>'),
(4, 'lastRun', 'Last run', 'readonly', '', 'text', 'specialchar', 'alnumx', 80, '', '', ''),
(4, 'lastStatus', 'Laststatus', 'readonly', '', 'text', 'specialchar', 'alnumx', 90, '', '', ''),
(4, 'inProgress', 'Running', 'show', '', 'text', 'specialchar', 'alnumx', 100, '', '',
'<p>Starttime of running job. When job is finished, will be set back to 0. A new job will only be started, if this is 0.</p>\r\n<p>&nbsp;</p>');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment