tasks/ and recurring work in cron/; Cron creates its queued task automatically.
Configure storage first
Queued Tasks require a Lifecycle factory registered with@lifecycle.storage.tasks; declaring @task alone is not enough. Add the factory under the agent’s root lifecycle/ folder. Follow Configure Lifecycle storage for a complete lifecycle/storage.py example before queueing your first Task.
Waiting for a Task from a durable tool also needs a Harnest-owned checkpoint provider. Cron schedules need @lifecycle.storage.cron on the same factory as task storage. There is no default task database; see Task and cron storage for provider options.
Create a Task
Define, defer, inspect, cancel, and await a folder-discovered Task.
Cron schedules
Declare fixed UTC schedules in
cron/.Dynamic schedules
Create and control user-owned schedules from managed code.
Durable execution
Understand suspension, replica recovery, and the boundary between a Task and the framework run waiting for it.
API reference
Use theharnest.task reference for decorators, deferred calls, and TaskHandle methods. Use the harnest.cron reference for fixed Cron declarations, scheduling functions, and CronJob methods. Browse all public Python modules for the rest of Harnest’s API.