# ask-ai

Ismael Rodrigues

03/13/2024, 6:18 PM
Hey, how can I list the running jobs via CLI?


03/13/2024, 6:18 PM
To list running jobs via the CLI, you can use the
dagster job list
command. However, the documentation does not provide a specific command to list only the running jobs. The
dagster job list
command will list all jobs, but it does not filter them by their running status. If you need to see the status of specific job runs, you might consider using the GraphQL API to query for runs with a specific status. The
query can be used with a filter argument to retrieve runs with certain statuses, such as
. Here's an example GraphQL query to get all running (started but not finished) job runs:
Copy code
graphql query RunningJobsQuery {   runsOrError(filter: { statuses: [STARTED] }) {     __typename     ... on Runs {       results {         runId         jobName         status         runConfigYaml         startTime         endTime       }     }   } }
You would need to send this query to your Dagster instance's GraphQL endpoint. Keep in mind that this is not a CLI command but rather a way to interact with Dagster's API programmatically or through a tool that allows you to execute GraphQL queries. For more detailed information on how to interact with the GraphQL API, you can refer to the documentation on the GraphQL interface provided by Dagster.