From eb8656b366bdea0d1420e6f5054d2832b27dbd16 Mon Sep 17 00:00:00 2001 From: Manuel Biertz <87469600+biertz@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:53:31 +0100 Subject: [PATCH] :bug: Fix exemplary cron syntax. (#4278) Co-authored-by: Chad Carlson --- sites/platform/src/guides/symfony/crons.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sites/platform/src/guides/symfony/crons.md b/sites/platform/src/guides/symfony/crons.md index 6b599a90ea..d212c87111 100644 --- a/sites/platform/src/guides/symfony/crons.md +++ b/sites/platform/src/guides/symfony/crons.md @@ -12,8 +12,8 @@ To set up a cron job, add a configuration similar to the following: crons: snapshot: spec: 0 5 * * * - commands: | - croncape symfony ... + commands: + start: croncape symfony ... ``` To run a command in a cron hook for specific environment types, @@ -23,11 +23,12 @@ use the `PLATFORM_ENVIRONMENT_TYPE` environment variable: crons: snapshot: spec: 0 5 * * * - commands: | - # only run for the production environment, aka main branch - if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then - croncape symfony ... - fi + commands: + start: | + # only run for the production environment, aka main branch + if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then + croncape symfony ... + fi ``` ## Use croncape