Undefined Schedule Spec When Trying to Schedule a Workflow in Python SDK

I am using temporal to schedule a workflow based on the future date.
The workflow has to run only once on the scheduled datetime

async def create_scheduled_workflow():
    client = await Client.connect("localhost:7233")

    start_time = datetime(2026, 2, 10, 14, 30)  # Feb 10, 2026, at 14:30 UTC

    schedule = Schedule(
        action=ScheduleActionStartWorkflow(
            "ProductWorkflow",
            id="scheduled-workflow-2026",
            task_queue="my-task-queue",
        ),
        spec=ScheduleSpec(
            start_at=start_time,  # Future execution time
        ),
    )

    await client.create_schedule("workflow-scheduler-2026", schedule)

if __name__ == "__main__":
    import asyncio
    asyncio.run(create_scheduled_workflow())

I understood start_at doesn’t mean starting the execution. I used calendar for this

schedule = Schedule(
        action=ScheduleActionStartWorkflow(
            "Producct",
            id="scheduled-workflow-2026",
            task_queue="my-task-queue",
        ),
        spec=ScheduleSpec(
            calendars=[
                ScheduleCalendarSpec(
                    minute=[ScheduleRange(start_time.minute, start_time.minute)],
                    hour=[ScheduleRange(start_time.hour, start_time.hour)],
                    day_of_month=[ScheduleRange(start_time.day, start_time.day)],
                    month=[ScheduleRange(start_time.month, start_time.month)],
                    year=[ScheduleRange(start_time.year, start_time.year)]
                )
            ]
        ),
    )

This worked

You are correct, can do ScheduleCalendarSpec as you mentioned for example:

spec=ScheduleSpec(
                calendars=[
                    ScheduleCalendarSpec(
                        second=(ScheduleRange(0, ),),
                        minute=(ScheduleRange(30, ),),
                        hour=(ScheduleRange(14),),
                        day_of_month=(ScheduleRange(10),),
                        month=(ScheduleRange(2),),
                        year=(ScheduleRange(2026),),
                    )
                ],
            ),

but i think for “one-off” executions in the future probably dont need schedule but can use delayed start feature, for example:

await client.start_workflow(
        //...
        start_delay=start_delay,
)

with start_delay the execution will be created right away so you can “reserve” the workflow id but first workflow task wont be dispatched until your specified delay