<@ULVA73B9P> how do I view upcoming runs for a wor...
# ask-marvin
j
@Marvin how do I view upcoming runs for a work pool in the CLI?
m
thought for 45.1 seconds
Use the work pool preview command. It shows scheduled work for all queues in the pool over a lookahead window. Examples:
Copy code
prefect work-pool preview my-pool
(Default lookahead is 1 hour) Look ahead 24 hours:
Copy code
prefect work-pool preview my-pool --hours 24
Tip: You can pass the pool name or ID. Run
prefect work-pool preview --help
to see options.
j
I am looking for runs not preview
@Marvin this command is returning nothing:
prefect work-queue read-runs --pool default-agent-pool production
m
thought for 304.5 seconds
A couple things to note in Prefect 3.x: -
work-queue read-runs
only returns runs that are ready to execute right now (i.e., queued and eligible to be picked up). If your runs are scheduled in the future, it will return nothing. - To see upcoming/scheduled runs, use the
preview
commands instead. Try:
Copy code
# Upcoming runs across all queues in a pool
prefect work-pool preview default-agent-pool --hours 24

# Upcoming runs for a specific queue in a pool
prefect work-queue preview -p default-agent-pool production --hours 24

# Runs ready to execute now (what you were trying)
prefect work-queue read-runs -p default-agent-pool production
If you still expect runs from
read-runs
but get nothing, check: - The queue and pool aren’t paused:
Copy code
prefect work-queue inspect -p default-agent-pool production
- The deployment is actually targeting the
production
queue in
default-agent-pool
- There are runs scheduled for now or earlier (not only in the future) - Concurrency limits aren’t fully consumed on the pool/queue Docs: - Work pool CLI reference - Work queue CLI reference If you can share the output of
prefect work-queue ls -p default-agent-pool
and
prefect work-queue inspect -p default-agent-pool production
, I can help pinpoint why
read-runs
is empty.