prorm API Reference
    Preparing search index...

    Interface CreateEventOptions

    Options for creating an event

    interface CreateEventOptions {
        name: string;
        schedule: EventSchedule;
        body: string;
        schema?: string;
        ifNotExists?: boolean;
        replace?: boolean;
        comment?: string;
        status?: "ENABLED" | "DISABLED";
        onCompletion?: "PRESERVE" | "DROP";
    }
    Index
    name: string

    Event name

    schedule: EventSchedule

    Schedule (AT timestamp or EVERY interval)

    body: string

    Event body (SQL statements)

    schema?: string

    Schema (for MySQL database)

    ifNotExists?: boolean

    If true, uses CREATE EVENT IF NOT EXISTS

    replace?: boolean

    If true, uses OR REPLACE

    comment?: string

    Comment

    status?: "ENABLED" | "DISABLED"

    Enable or disable the event (ENABLED/DISABLED)

    onCompletion?: "PRESERVE" | "DROP"

    ON COMPLETION PRESERVE (default) or ON COMPLETION DROP