From 415e03f4c466f9dc1106247ca1b8c7e57fd6a4ed Mon Sep 17 00:00:00 2001 From: "j.guyon" Date: Fri, 9 Feb 2018 15:36:23 +0100 Subject: [PATCH 1/3] Add CommandScheduler bundle recipe --- .../2.0/config/packages/scheduler.yaml | 34 +++++++++++++++++++ .../2.0/config/routes/scheduler.yaml | 3 ++ .../2.0/manifest.json | 8 +++++ 3 files changed, 45 insertions(+) create mode 100644 jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml create mode 100644 jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml create mode 100644 jmose/command-scheduler-bundle/2.0/manifest.json diff --git a/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml b/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml new file mode 100644 index 00000000..da59fa0d --- /dev/null +++ b/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml @@ -0,0 +1,34 @@ +jmose_command_scheduler: + + # Default directory where scheduler will write output files + # This default value assume that php bin/console is launched from project's root and that the directory is writable + # if log_path is set to false, logging to files is disabled at all + log_path: "%kernel.logs_dir%" + + # This default value disables timeout checking (see monitoring), set to a numeric value (seconds) to enable it + lock_timeout: false + + # receivers for reporting mails + monitor_mail: [] + + # set a custom subject for monitor mails (first placeholder will be replaced by the hostname, second by the date) + monitor_mail_subject: cronjob monitoring %s, %s + + # to send "everything's all right" emails to receivers for reporting mails set this value to "true" (see monitoring) + send_ok: false + + # Namespaces listed here won't be listed in the list + excluded_command_namespaces: + - _global + - scheduler + - server + - container + - config + - generate + - init + - router + - doctrine + - debug + + # Doctrine manager + doctrine_manager: default \ No newline at end of file diff --git a/jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml b/jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml new file mode 100644 index 00000000..a4c03940 --- /dev/null +++ b/jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml @@ -0,0 +1,3 @@ +jmose_command_scheduler: + resource: "@JMoseCommandSchedulerBundle/Resources/config/routing.yml" + prefix: / \ No newline at end of file diff --git a/jmose/command-scheduler-bundle/2.0/manifest.json b/jmose/command-scheduler-bundle/2.0/manifest.json new file mode 100644 index 00000000..52f03bb6 --- /dev/null +++ b/jmose/command-scheduler-bundle/2.0/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "JMose\\CommandSchedulerBundle\\JMoseCommandSchedulerBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} From 6f9b01aa71633d93bdbedfde2baf56094e450637 Mon Sep 17 00:00:00 2001 From: "j.guyon" Date: Fri, 9 Feb 2018 15:38:41 +0100 Subject: [PATCH 2/3] new line --- .../command-scheduler-bundle/2.0/config/packages/scheduler.yaml | 2 +- jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml b/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml index da59fa0d..c811fbf8 100644 --- a/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml +++ b/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml @@ -31,4 +31,4 @@ jmose_command_scheduler: - debug # Doctrine manager - doctrine_manager: default \ No newline at end of file + doctrine_manager: default diff --git a/jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml b/jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml index a4c03940..47a0d48e 100644 --- a/jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml +++ b/jmose/command-scheduler-bundle/2.0/config/routes/scheduler.yaml @@ -1,3 +1,3 @@ jmose_command_scheduler: resource: "@JMoseCommandSchedulerBundle/Resources/config/routing.yml" - prefix: / \ No newline at end of file + prefix: / From 6201b89685967a87af15700ae8a981d62b3b4e0d Mon Sep 17 00:00:00 2001 From: "j.guyon" Date: Wed, 21 Feb 2018 12:10:59 +0100 Subject: [PATCH 3/3] Add a link to the full configuration Remove optional configuration Add post-install.txt --- .../2.0/config/packages/scheduler.yaml | 23 ++++--------------- .../2.0/post-install.txt | 9 ++++++++ 2 files changed, 13 insertions(+), 19 deletions(-) create mode 100644 jmose/command-scheduler-bundle/2.0/post-install.txt diff --git a/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml b/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml index c811fbf8..49159ebf 100644 --- a/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml +++ b/jmose/command-scheduler-bundle/2.0/config/packages/scheduler.yaml @@ -1,23 +1,11 @@ +# See full configuration at +# https://github.com/J-Mose/CommandSchedulerBundle/blob/master/Resources/doc/index.md#4---available-configuration jmose_command_scheduler: - # Default directory where scheduler will write output files - # This default value assume that php bin/console is launched from project's root and that the directory is writable - # if log_path is set to false, logging to files is disabled at all + # Scheduler will write output files here. set false to disable it. log_path: "%kernel.logs_dir%" - # This default value disables timeout checking (see monitoring), set to a numeric value (seconds) to enable it - lock_timeout: false - - # receivers for reporting mails - monitor_mail: [] - - # set a custom subject for monitor mails (first placeholder will be replaced by the hostname, second by the date) - monitor_mail_subject: cronjob monitoring %s, %s - - # to send "everything's all right" emails to receivers for reporting mails set this value to "true" (see monitoring) - send_ok: false - - # Namespaces listed here won't be listed in the list + # Add namespace you don't want to see its Command in the scheduler. excluded_command_namespaces: - _global - scheduler @@ -29,6 +17,3 @@ jmose_command_scheduler: - router - doctrine - debug - - # Doctrine manager - doctrine_manager: default diff --git a/jmose/command-scheduler-bundle/2.0/post-install.txt b/jmose/command-scheduler-bundle/2.0/post-install.txt new file mode 100644 index 00000000..5ac420ae --- /dev/null +++ b/jmose/command-scheduler-bundle/2.0/post-install.txt @@ -0,0 +1,9 @@ + + What's next for JMoseCommandSchedulerBundle ? + + + * Configure your application: + 1. Secure your route by adding - { path: ^/command-scheduler, role: ROLE_ADMIN } in your security config. + 2. Set the single-entry point in crontab : * * * * * php /your_app/bin/console scheduler:execute + + * Schedule your commands at http://your-app/command-scheduler/list