Skip to content

IF_Schedulable

Class · Group: Schedulables

apex
global interface IF_Schedulable implements Schedulable

Implements: Schedulable

Known Derived Types: SCHED_Base, SCHED_DeactivateUsers, SCHED_PurgeRecords, SCHED_Base.getParameterDefinitions(), SCHED_Base.setParameterValues(DTO_NameValues)

An interface for a Schedulable class that can declare the parameters it supports and receive validated parameter values at scheduling time. Enables dynamic form rendering in the scheduledJobEditor LWC and required parameter validation by the trigger framework. Implementors have two paths: Extend SCHED_Base for built-in typed parameter resolution, default values, and accessors. Implement IF_Schedulable directly on an existing Schedulable class for full control.

Since: 1.0

Example:

apex
global class SCHED_MyJob extends SCHED_Base
{
    public override List<DTO_ScheduledParameterDefinition> getParameterDefinitions()
    {
        return new List<DTO_ScheduledParameterDefinition>
        {
            DTO_ScheduledParameterDefinition.of('objectName').required()
        };
    }
    public void execute(SchedulableContext context) { }
}

See Also: Schedulable, SCHED_Base, DTO_ScheduledParameterDefinition, DTO_NameValues


Methods

MethodDescription
global abstract List getParameterDefinitions()Returns the parameter definitions supported by this scheduled class.
global abstract void setParameterValues(DTO_NameValues parameterValues)Receives the validated parameter values at scheduling time.

Method Details

getParameterDefinitions

apex
global abstract List<DTO_ScheduledParameterDefinition> getParameterDefinitions()

Returns the parameter definitions supported by this scheduled class. Used by the scheduledJobEditor LWC to render structured parameter forms and by the trigger framework for required parameter validation.

Returns: DTO_ScheduledParameterDefinition - List of parameter definitions, or an empty list if no parameters are supported.

Since: 1.0

setParameterValues

apex
global abstract void setParameterValues(DTO_NameValues parameterValues)

Receives the validated parameter values at scheduling time. Called by the trigger framework after required parameter validation succeeds.

Parameters:

  • parameterValues (DTO_NameValues) - The name-value pairs containing the resolved parameter values.

Since: 1.0