LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-sdk_synccron
    Module●Since v0.3

    cron

    Synchronous cron client for LangGraph SDK.

    Attributes

    Classes

    Type Aliases

    View source on GitHub
    attribute
    All: Literal['*']
    attribute
    CronSelectField: Literal['cron_id', 'assistant_id', 'thread_id', 'end_time', 'schedule', 'timezone', 'created_at', 'updated_at', 'user_id', 'payload', 'next_run_date', 'metadata', 'now', 'on_run_completed', 'enabled']
    attribute
    CronSortBy: Literal['cron_id', 'assistant_id', 'thread_id', 'created_at', 'updated_at', 'next_run_date', 'end_time']
    attribute
    Durability: Literal['sync', 'async', 'exit']
    attribute
    OnCompletionBehavior: Literal['delete', 'keep']
    attribute
    SortOrder: Literal['asc', 'desc']
    attribute
    StreamMode: Literal['values', 'messages', 'updates', 'events', 'tasks', 'checkpoints', 'debug', 'custom', 'messages-tuple']
    class
    SyncHttpClient
    class
    Config
    class
    Cron
    class
    Run
    class
    SyncCronClient
    typeAlias
    Context: TypeAlias
    typeAlias
    Input: TypeAlias
    typeAlias
    QueryParamTypes: Mapping[str, PrimitiveData | Sequence[PrimitiveData]] | list[tuple[str, PrimitiveData]] | tuple[tuple[str, PrimitiveData], ...] | str | bytes

    Represents a wildcard or 'all' selector.

    The field to sort by.

    Durability mode for the graph execution.

    • "sync": Changes are persisted synchronously before the next step starts.
    • "async": Changes are persisted asynchronously while the next step executes.
    • "exit": Changes are persisted only when the graph exits.

    Defines action after completion:

    • "delete": Delete resources after completion.
    • "keep": Retain resources after completion.

    The order to sort by.

    Defines the mode of streaming:

    • "values": Stream only the values.
    • "messages": Stream complete messages.
    • "updates": Stream updates to the state.
    • "events": Stream events occurring during execution.
    • "checkpoints": Stream checkpoints as they are created.
    • "tasks": Stream task start and finish events.
    • "debug": Stream detailed debug information.
    • "custom": Stream custom events.

    Handle synchronous requests to the LangGraph API.

    Provides error messaging and content handling enhancements above the underlying httpx client, mirroring the interface of HttpClient but for sync usage.

    Configuration options for a call.

    Represents a scheduled task.

    Represents a single execution run.

    Synchronous client for managing cron jobs in LangGraph.

    This class provides methods to create and manage scheduled tasks (cron jobs) for automated graph executions.

    Example
    client = get_sync_client(url="http://localhost:8123")
    cron_job = client.crons.create_for_thread(thread_id="thread_123", assistant_id="asst_456", schedule="0 * * * *")
    Feature Availability

    The crons client functionality is not supported on all licenses. Please check the relevant license documentation for the most up-to-date details on feature availability.