improve docs

This commit is contained in:
Alessio Gravili
2025-08-22 16:58:29 -07:00
parent 7006673ab0
commit eabd489b80
2 changed files with 3 additions and 3 deletions

View File

@@ -197,7 +197,7 @@ pnpm payload jobs:run --cron "*/5 * * * *"
You can also pass `--handle-schedules` flag to the `jobs:run` command to make it schedule jobs according to configured schedules:
```sh
pnpm payload jobs:run --queue myQueue --handle-schedules # This will both schedule jobs according to the configuration and run them
pnpm payload jobs:run --cron "*/5 * * * *" --queue myQueue --handle-schedules # This will both schedule jobs according to the configuration and run them
```
## Processing Order

View File

@@ -40,13 +40,13 @@ You can disable this behavior by setting `disableScheduling: true` in your `auto
Payload provides a set of bin scripts that can be used to handle schedules. If you're already using the `jobs:run` bin script, you can set it to also handle schedules by passing the `--handle-schedules` flag:
```sh
pnpm payload jobs:run --queue myQueue --handle-schedules # This will both schedule jobs according to the configuration and run them
pnpm payload jobs:run --cron "*/5 * * * *" --queue myQueue --handle-schedules # This will both schedule jobs according to the configuration and run them
```
If you only want to handle schedules, you can use the dedicated `jobs:handle-schedules` bin script:
```sh
pnpm payload jobs:handle-schedules --queue myQueue # or --all-queues
pnpm payload jobs:handle-schedules --cron "*/5 * * * *" --queue myQueue # or --all-queues
```
## Defining schedules on Tasks or Workflows