state-scheduling.md

Created about 12 hours ago

attributes
source_pathreferences/state-scheduling.md
source_sha25676fca096c36f01b8c5420391de71bd22838bf0914adda303d384fecb99c79684
source_urlhttps://github.com/cloudflare/skills/blob/47dfc2ce969bf62acf8bc231198ade4bb02712e0/skills/agents-sdk/references/state-scheduling.md
supporting_skill_id40176
upstream_revision47dfc2ce969bf62acf8bc231198ade4bb02712e0

State & Scheduling

Read the current Cloudflare documentation before implementing state, SQL, or scheduling; check installed SDK versions when adapting an existing agent.

Task Documentation
Define state, validate updates, choose state versus SQL, and query SQLite Store and sync state
Synchronize state with React or vanilla JavaScript clients Client SDK
Select delayed, date-based, cron, or interval execution; manage schedules and callbacks Schedule tasks
Configure schedule retry behavior Retries
Handle lifecycle events, connections, and hibernation WebSockets

Use synchronized state for data clients need immediately, and SQL for larger collections, history, or queries. Reject invalid updates in the validation hook; state-change notifications are for reacting to accepted updates. Use the state documentation for current hook names and behavior.

Choose a one-time delay or date for work that runs once, cron for calendar recurrence, and an interval for a fixed cadence. For queued work and retry tradeoffs, see queue-retries.md.

Children

No children yet.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.