Skip to content

Commit

Permalink
🐛 Fix exemplary cron syntax. (#4278)
Browse files Browse the repository at this point in the history
Co-authored-by: Chad Carlson <[email protected]>
  • Loading branch information
biertz and chadwcarlson authored Dec 9, 2024
1 parent 799f3fb commit eb8656b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions sites/platform/src/guides/symfony/crons.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit eb8656b

Please sign in to comment.