Files
Grav/system/blueprints/config/scheduler.yaml
Andy Miller 5499f2edb6 Feature/scheduler (#2170)
* scheduler first commit

* moved jobs to config

* got some args working

* commands and static methods working.. events hooked up

* No longer dependent on `exec()`.. uses Symfony\Process

* More improvements

* support getAt()

* Make inflector available in DI

* Fix for inflector

* store job run states

* more improvements including cron twig function

* Add scheduler to event + cleanup

* improvements to the CLI command

* Added id field

* use proper func

* Added email

* Fix quotes

* Updated built-in composer

* Better command for adding the scheduler cron via terminal

* Fixed typo and added cron language

* Added Cron class to make at -> human readable date possible

* Added some checks when there are no jobs

* Added method to get CronExpression

* Revamped with Symfony 4.1 CLI updates
2018-09-05 19:02:12 -06:00

97 lines
3.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

title: PLUGIN_ADMIN.SCHEDULER
form:
validation: loose
fields:
tabs:
type: tabs
class: subtle
fields:
status_tab:
type: tab
title: Status
fields:
setup_title:
type: section
title: PLUGIN_ADMIN.SCHEDULER_SETUP
underline: true
setup:
type: croninstall
status_title:
type: section
title: PLUGIN_ADMIN.SCHEDULER_STATUS
underline: true
status:
type: cronstatus
validate:
type: commalist
custom_tab:
type: tab
title: Custom
fields:
jobs_title:
type: section
title: PLUGIN_ADMIN.SCHEDULER_JOBS
underline: false
custom_jobs:
type: list
style: vertical
label:
classes: cron-job-list
key: id
fields:
.id:
type: key
label: ID
placeholder: 'process-name'
validate:
required: true
pattern: '[a-zа-я0-9_\-]+'
max: 20
message: 'ID must be lowercase with dashes/underscores only and less than 20 characters'
.command:
type: text
label: Command
placeholder: 'cd ~;ls -lah;'
validate:
required: true
.args:
type: text
label: Extra Arguments
.at:
type: cron
label: Run At
help: 'Cron formatted "at" syntax'
placeholder: '* * * * *'
validate:
required: true
.output:
type: text
label: Output File
help: 'The path/filename of the output file (from the root of the Grav installation)'
placeholder: 'logs/ls-cron.out'
.output_mode:
type: select
label: Output Type
help: 'Either append to the same file each run, or overwrite the file with each run'
default: append
options:
append: Append
overwrite: Overwrite
.email:
type: text
label: Email
help: 'Email to send output to. NOTE: requires output file to be set'
placeholder: 'notifications@yoursite.com'