Skip to main content

createScheduledTask

plugin.chatApi.createScheduledTask(data: CreateScheduledTaskRequest): Promise<unknown>

Creates a new scheduled task.

Registers a task that will be executed at a future time, tracked within the chat context.

Parameters

ParameterTypeRequiredDescription
dataCreateScheduledTaskRequestYesThe scheduled task creation payload

Returns

Promise<unknown> — A promise that resolves to the created task data

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.chatApi.createScheduledTask(/* CreateScheduledTaskRequest */);
console.log(result);