Member Junction
    Preparing search index...

    Abstract base class for scheduled job implementations

    Each ScheduledJobType in the database has a corresponding DriverClass that extends this base. The plugin is responsible for:

    • Parsing job-specific configuration from the Configuration JSON field
    • Executing the job with appropriate domain logic
    • Formatting notifications in a job-appropriate way
    • Validating job-specific configuration
    @RegisterClass(BaseScheduledJob, 'ScheduledJobAgent')
    export class ScheduledJobAgent extends BaseScheduledJob {
    async Execute(context: ScheduledJobExecutionContext): Promise<ScheduledJobResult> {
    const config = this.parseConfiguration<AgentJobConfiguration>(context.Schedule);
    const agentRun = await this.runAgent(config, context.ContextUser);
    return {
    Success: agentRun.Success ?? false,
    ErrorMessage: agentRun.ErrorMessage,
    Details: {
    AgentRunID: agentRun.ID,
    TokensUsed: agentRun.TotalTokensUsed,
    Cost: agentRun.TotalCost
    }
    };
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get IsHighFrequencyByDesign(): boolean

      Whether this driver is a BY-DESIGN high-frequency poller — a dispatcher that sweeps a work queue on a tight cron (e.g. every minute) and does bounded work per sweep. Overriding to true exempts jobs of this type from the engine's high-frequency cron warning banner. Leave false for ordinary jobs: the warning exists because a tight cron on a work job is usually a design smell.

      Returns boolean

    Methods

    • Protected

      Log execution progress

      Parameters

      • message: string

        Log message

      • verboseOnly: boolean = false

        Whether to only log in verbose mode

      Returns void