Why Use Scheduled Bots?
Punctual joining
When creating an ad-hoc bot there is a slight delay because of the need to allocate resources. Scheduled bots join at exactly the specified time, because the resources are allocated in advance.
No job scheduler needed
Avoid having to write your own job scheduler for launching bots. We handle the scheduling for you.
Calendar integration
Perfect for joining meetings at scheduled calendar event times.
Creating a Scheduled Bot
To create a scheduled bot, include thejoin_at parameter when making your bot creation API call:
Requirements for the join_at field
- Cannot be in the past: The
join_attime must be in the future - Minimum lead time: Ideally set
join_atat least 2 minutes in the future to allow sufficient time to spin up the resources for the bot - Format: Use ISO 8601 format (e.g.,
2024-01-15T10:30:00Z)
Bot State Lifecycle
Scheduled bots follow a different state progression than ad-hoc bots:Scheduled State
When: Initial state when a bot is created with a
join_at timeWhat happens: The bot is queued and waiting until it’s time to allocate resources for the botDuration: Until resources are allocated (a few minutes before join_at)Staged State
When: Resources have been allocated and the bot is ready to joinWhat happens: The bot resources are allocated and the bot is waiting for the exact join timeDuration: Until the
join_at timeJoining State
When: At the specified
join_at timeWhat happens: The bot actively attempts to join the meetingDuration: Until the bot successfully joins or encounters an errorManaging Scheduled Bots
You can reschedule or cancel scheduled bots while they are in thescheduled state.
Rescheduling a Scheduled Bot
To change the join time of a scheduled bot, use the PATCH endpoint: Request:- Bot must be in
scheduledstate - New
join_attime cannot be in the past - Uses the same validation rules as when creating a scheduled bot
Unscheduling (Deleting) a Scheduled Bot
To cancel a scheduled bot before it joins, use the DELETE endpoint: Request:- Bot must be in
scheduledstate - Once deleted, the bot cannot be recovered
- This operation only works for scheduled bots that haven’t started joining yet