ScheduledTaskCreateRequest (schemas/scheduled_task.py)

poco-claw · backend/app/schemas/scheduled_task.py · python · MIT
automation, tag:knn-classified

Pydantic schemas for creating, updating, and responding to scheduled tasks in the Poco backend.

# Source: https://github.com/poco-ai/poco-claw | License: MIT | Copyright 2026 poco-ai
# Provided via justclaw.it.com; keep this notice with the code.
from datetime import datetime
from uuid import UUID

from pydantic import BaseModel, ConfigDict, Field

from app.schemas.session import TaskConfig


class ScheduledTaskCreateRequest(BaseModel):
    name: str
    cron: str
    timezone: str = "UTC"
    prompt: str
    enabled: bool = True
    reuse_session: bool = True
    project_id: UUID | None = None
    config: TaskConfig | None = None


class ScheduledTaskUpdateRequest(BaseModel):
    name: str | None = None
    cron: str | None = None
    timezone: str | None = None
    prompt: str | None = None
    enabled: bool | None = None


class ScheduledTaskResponse(BaseModel):
    scheduled_task

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key