event

A calendar event: when it starts, how long it lasts, and whether and how it repeats.

At a glance

Writing

Write an object with these keys; any other key is refused, with the list of the accepted ones:

Instead of an rrule you can describe the repetition as Google Calendar does. The rule is built from these keys and only the rule is stored:

Weekday hours from 8:00 to 18:30:

{"start_datetime": "2026-01-05T08:00:00", "timezone": "America/New_York", "duration_minutes": 630, "repeat_frequency": "weekly", "repeat_on_weekdays": ["monday", "tuesday", "wednesday", "thursday", "friday"]}

is stored as {"duration_minutes": 630, "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start_datetime": "2026-01-05T08:00:00", "timezone": "America/New_York"}.

For a public holiday in the United States, give holiday instead of a rule, such as {"name": "Thanksgiving Day"}. Loose spellings such as july 4th are accepted and stored under the holiday's proper name. The event then repeats yearly on that day, at the start's local time, from the start on. holiday_subdivision names a state, for state holidays, and holiday_observed picks actual (the date itself), observed (the weekday it is observed on, when that differs) or either (the default). A holiday cannot be combined with any other repetition.

A few other spellings of keys are accepted: start, tz, duration, interval, and recurrence, frequency or repeat for repeat_frequency.

A sentence instead of an object ("every Monday from 9 to noon") is read into these keys by a model, which costs a model call. A field that holds a list of events takes a sentence with several windows ("Monday to Friday 8 to 12 and 1 to 5") as several events; a field that holds one event refuses such a sentence.

Written as

A JSON string or object whose schema format is event.

Reading

An entity's YAML shows an event as its stored keys. Through get_content it is its JSON on one line.

Querying

An event field holds the event's stored JSON and is compared as that text; it has no text or similarity search. A JSON object in a filter is first turned into the stored form, so equality matches however its keys were written. A sentence is compared as written: HQL never reads it as an event. To find events by how they repeat, match a pattern in the rule:

ScheduledJob | schedule like '%FREQ=WEEKLY%' AND active = true | select id, description, schedule, next_run_at

Every operator is in the HQL reference.

Editing

edit changes the stored keys with JSON Pointer ops: {"op": "replace", "path": "/duration_minutes", "value": 600}. Change how it repeats at /rrule: a stored event keeps its repetition there, and an edit that adds a Google Calendar key beside an rrule is refused, pointing at /rrule. A key the event does not accept is refused.

In agent tools

An agent passes an event as an object with the keys above, or as a sentence, which a model reads.

Operations

Through the dtypes resource: