> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentscope.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List all schedules

> List all schedules owned by the current user.

Args:
    user_id (`str`): Authenticated user ID.
    storage (`StorageBase`): Storage instance.

Returns:
    `ListSchedulesResponse`:
        Paginated list of schedule records.



## OpenAPI

````yaml /versions/2.0.2/en/deploy/openapi.json get /schedule/
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.1
servers: []
security: []
paths:
  /schedule/:
    get:
      tags:
        - schedule
      summary: List all schedules
      description: |-
        List all schedules owned by the current user.

        Args:
            user_id (`str`): Authenticated user ID.
            storage (`StorageBase`): Storage instance.

        Returns:
            `ListSchedulesResponse`:
                Paginated list of schedule records.
      operationId: list_schedules_schedule__get
      parameters:
        - name: x-user-id
          in: header
          required: true
          schema:
            type: string
            description: >-
              Caller's user ID. Temporary header-based identity; will be
              replaced by JWT auth.
            title: X-User-Id
          description: >-
            Caller's user ID. Temporary header-based identity; will be replaced
            by JWT auth.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSchedulesResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListSchedulesResponse:
      properties:
        schedules:
          items:
            $ref: '#/components/schemas/ScheduleRecord'
          type: array
          title: Schedules
          description: Schedule records.
        total:
          type: integer
          title: Total
          description: Total number of schedules.
      type: object
      required:
        - schedules
        - total
      title: ListSchedulesResponse
      description: Response body for listing schedules.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ScheduleRecord:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the credential.
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_at:
          type: string
          format: date-time
          title: Created At
        user_id:
          type: string
          title: User Id
          description: Owner user id.
        agent_id:
          type: string
          title: Agent Id
          description: The agent id that will execute the schedule.
        data:
          $ref: '#/components/schemas/ScheduleData'
          description: Schedule configuration.
      type: object
      required:
        - user_id
        - agent_id
        - data
      title: ScheduleRecord
      description: Persisted schedule record.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ScheduleData:
      properties:
        name:
          type: string
          title: Name
          description: Display name of the schedule.
        description:
          type: string
          title: Description
          description: >-
            The description of the schedule, including its purpose, trigger
            conditions, etc.
          default: ''
        enabled:
          type: boolean
          title: Enabled
          description: >-
            Whether the schedule is active. Disabled schedules are retained but
            will not trigger.
          default: true
        timezone:
          type: string
          title: Timezone
          description: >-
            IANA timezone name used to evaluate the cron expression, e.g.
            'America/New_York' or 'Asia/Shanghai'.
          default: Asia/Shanghai
        cron_expression:
          type: string
          title: Cron Expression
          description: Standard 5-field cron expression, e.g. '0 9 * * 1-5'.
        started_at:
          type: string
          format: date-time
          title: Started At
          description: The date and time the schedule was started.
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
          description: The date and time the schedule was ended.
        chat_model_config:
          $ref: '#/components/schemas/ChatModelConfig'
          description: Model configuration for the auto-created session.
        stateful:
          type: boolean
          title: Stateful
          description: >-
            Whether consecutive executions share the same session context. If
            not, each execution will have its own state.
          default: false
        permission_mode:
          $ref: '#/components/schemas/PermissionMode'
          title: Permission mode
          description: >-
            Permission level for the agent during scheduled execution. Defaults
            to DONT_ASK since no user is present to answer prompts.
          default: dont_ask
        source:
          $ref: '#/components/schemas/ScheduleSource'
          description: Indicates how this schedule was created.
          default: USER
        source_session_id:
          type: string
          title: Source Session Id
          description: The source session identifier, used for resource retrieval.
          default: ''
      type: object
      required:
        - name
        - cron_expression
        - chat_model_config
      title: ScheduleData
      description: The schedule configuration data.
    ChatModelConfig:
      properties:
        type:
          type: string
          title: Type
        credential_id:
          type: string
          title: Credential Id
        model:
          type: string
          title: Model
        parameters:
          additionalProperties: true
          type: object
          title: Parameters
      type: object
      required:
        - type
        - credential_id
        - model
        - parameters
      title: ChatModelConfig
      description: The model configuration class.
    PermissionMode:
      type: string
      enum:
        - default
        - accept_edits
        - explore
        - bypass
        - dont_ask
      title: PermissionMode
      description: >-
        The mode of permission.


        Permission modes control how the system handles tool execution requests.

        Different modes are suitable for different scenarios:


        +---------------+--------------------------------------------------+--------------------------------+

        | Mode          | Behavior                                         | Use
        Case                       |

        +===============+==================================================+================================+

        | DEFAULT       | All operations require explicit permission       |
        Default mode, most secure      |

        |               | (unless there are explicit allow rules)         
        |                                |

        +---------------+--------------------------------------------------+--------------------------------+

        | ACCEPT_EDITS  | - Auto-allow file writes in working directories | User
        present, rapid iteration  |

        |               | - Auto-allow file reads in working directories  |
        development                    |

        |               | - Auto-allow filesystem commands (mkdir, rm, mv)
        |                                |

        |               | - Other operations follow normal rules          
        |                                |

        +---------------+--------------------------------------------------+--------------------------------+

        | EXPLORE       | Read-only mode:                                  |
        Exploring codebase, planning   |

        |               | - Allow: Read, Grep, Glob (read-only tools)     |
        implementation                 |

        |               | - Deny: Write, Edit, Bash (modification tools) 
        |                                |

        +---------------+--------------------------------------------------+--------------------------------+

        | BYPASS        | All operations automatically allowed             |
        Testing environment, sandbox,  |

        |               | (no permission checks)                           |
        fully trusted scenarios        |

        +---------------+--------------------------------------------------+--------------------------------+

        | DONT_ASK      | Convert all ASK decisions to DENY                |
        Scheduled tasks, background    |

        |               | (user not available to answer prompts)           |
        execution when user is away    |

        +---------------+--------------------------------------------------+--------------------------------+


        Attributes:
            DEFAULT: Default mode - requires explicit permission for each action
            ACCEPT_EDITS: Accept edits mode - automatically allows file edits within working directories
            EXPLORE: Explore mode - read-only, no writes or command execution allowed
            BYPASS: Bypass mode - allows all actions without permission checks
            DONT_ASK: Don't ask mode - converts all ASK decisions to DENY (for unattended execution)
    ScheduleSource:
      type: string
      enum:
        - USER
        - AGENT
      title: ScheduleSource
      description: |-
        The source that created the schedule.

        Attributes:
            USER: Created manually by the user via the UI.
            AGENT: Created automatically by an agent, e.g. via a tool call.

````