mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
* 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
97 lines
3.3 KiB
YAML
97 lines
3.3 KiB
YAML
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'
|
||
|
||
|
||
|
||
|