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

# Zeitplan aktualisieren

> Einen vorhandenen Zeitplan aktualisieren.

<div id="permissions">
  ## Berechtigungen
</div>

Erfordert einen Servicebenutzer mit der Berechtigung `ManageOrgSchedules` auf Organisationsebene.

<div id="notes">
  ## Hinweise
</div>

Alle Felder sind optional. Nur die im Request-Body angegebenen Felder werden aktualisiert. Um einen Zeitplan zu deaktivieren, setzen Sie `enabled` auf `false`.

Wenn Sie `playbook_id` auf `null` setzen, wird das zugehörige Playbook gelöscht.

Sie können den `schedule_type` zwischen `recurring` und `one_time` ändern. Wenn Sie zu `one_time` wechseln, geben Sie `scheduled_at` mit einem zukünftigen Datum-Uhrzeit-Wert im ISO-8601-Format an. Wenn Sie zu `recurring` wechseln, geben Sie `frequency` mit einem gültigen Cron-Ausdruck an.

<div id="execution-identity">
  ## Ausführungsidentität
</div>

Der Parameter `run_as_user_id` steuert, unter welcher Benutzeridentität der Zeitplan ausgeführt wird. Wenn ein Zeitplan ausgelöst wird, werden Sitzungen für diesen Benutzer erstellt – er erhält Benachrichtigungen und die Sitzung erscheint in seinem Verlauf.

* **Benutzer festlegen**: Geben Sie eine gültige Benutzer-ID an, um die Ausführungsidentität zu ändern. Dies erfordert:
  1. Der Servicebenutzer muss die Berechtigung `ImpersonateOrgSessions` haben
  2. Der Zielbenutzer muss Mitglied der Organisation sein
  3. Der Zielbenutzer muss die Berechtigung `UseDevinSessions` haben
* **Löschen (auf `null` setzen)**: Setzt den Zeitplan zurück, sodass er mit dem Standard-Bot-Benutzer ausgeführt wird
* **Feld weglassen**: Belässt die aktuelle Ausführungsidentität unverändert


## OpenAPI

````yaml de/v3-openapi.json PATCH /v3/organizations/{org_id}/schedules/{schedule_id}
openapi: 3.1.0
info:
  description: Devin v3 API mit Service-Benutzer-Authentifizierung und RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/schedules/{schedule_id}:
    patch:
      tags:
        - schedules
      summary: Zeitplan aktualisieren
      description: Einen vorhandenen Zeitplan aktualisieren.
      operationId: >-
        handle_update_schedule_v3_organizations__org_id__schedules__schedule_id__patch
      parameters:
        - description: 'Zeitplan-ID (Präfix: sched-)'
          in: path
          name: schedule_id
          required: true
          schema:
            example: sched-abc123def456
            title: Schedule Id
            type: string
        - description: 'Organisations-ID (Präfix: org-)'
          in: path
          name: org_id
          required: true
          schema:
            example: org-abc123def456
            title: Org Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
          description: Erfolgreiche Antwort
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validierungsfehler
components:
  schemas:
    ScheduleUpdateRequest:
      properties:
        agent:
          anyOf:
            - enum:
                - devin
                - data_analyst
              type: string
            - type: 'null'
          title: Agent
        bypass_approval:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Bypass Approval
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Frequency
        interval_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Interval Count
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        notify_on:
          anyOf:
            - enum:
                - always
                - failure
                - never
              type: string
            - type: 'null'
          title: Notify On
        platform:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            VM-Plattform für Sitzungen, die durch diesen Zeitplan gestartet
            werden (z. B. „windows“). Wenn sie weggelassen wird, bleibt die
            Plattform unverändert. Der Wert muss mit einer für die Organisation
            konfigurierten Plattform übereinstimmen (Groß-/Kleinschreibung wird
            nicht beachtet); unbekannte Werte werden mit einem 400-Fehler
            abgelehnt, der die verfügbaren Plattformbezeichnungen auflistet.
          title: Platform
        playbook_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Playbook Id
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        run_as_user_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Legt die Nutzer-ID fest, unter der dieser Zeitplan ausgeführt wird.
            Erfordert die Berechtigung ImpersonateOrgSessions. Wenn der Wert auf
            null gesetzt wird, wird wieder der Standard-Bot-Nutzer verwendet.
            Wird das Feld weggelassen, bleibt die aktuelle Identität
            unverändert.
          title: Run As User Id
        schedule_type:
          anyOf:
            - enum:
                - recurring
                - one_time
              type: string
            - type: 'null'
          title: Schedule Type
        scheduled_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Scheduled At
        slack_channel_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Channel Id
        slack_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Team Id
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        target_devin_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Devin Id
      title: ScheduleUpdateRequest
      type: object
    ScheduleResponse:
      properties:
        agent:
          enum:
            - devin
            - data_analyst
          title: Agent
          type: string
        bypass_approval:
          default: false
          title: Bypass Approval
          type: boolean
        consecutive_failures:
          title: Consecutive Failures
          type: integer
        created_at:
          format: date-time
          title: Created At
          type: string
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        enabled:
          title: Enabled
          type: boolean
        frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Frequency
        interval_count:
          default: 1
          title: Interval Count
          type: integer
        last_edited_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Edited By
        last_error_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Error At
        last_error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error Message
        last_executed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Executed At
        name:
          title: Name
          type: string
        notify_on:
          enum:
            - always
            - failure
            - never
          title: Notify On
          type: string
        org_id:
          title: Org Id
          type: string
        platform:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform
        playbook:
          anyOf:
            - $ref: '#/components/schemas/PlaybookInfo'
            - type: 'null'
        prompt:
          title: Prompt
          type: string
        schedule_type:
          default: recurring
          enum:
            - recurring
            - one_time
          title: Schedule Type
          type: string
        scheduled_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Scheduled At
        scheduled_session_id:
          title: Scheduled Session Id
          type: string
        slack_channel_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Channel Id
        slack_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Team Id
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        target_devin_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Devin Id
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - scheduled_session_id
        - org_id
        - created_by
        - name
        - prompt
        - playbook
        - frequency
        - enabled
        - last_executed_at
        - created_at
        - updated_at
        - last_error_at
        - last_error_message
        - consecutive_failures
        - notify_on
        - agent
      title: ScheduleResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    PlaybookInfo:
      properties:
        playbook_id:
          title: Playbook Id
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - playbook_id
        - title
      title: PlaybookInfo
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Anmeldedaten für Service-Benutzer (Präfix: cog_)'
      scheme: bearer
      type: http

````