Skip to main content
Version: 5.4.0

Job scheduler

Use the Job Scheduler to run backend logic automatically at a defined time or interval. This is another way to integrate a KAIZEN application with other systems when the work does not need to be triggered by a user action or an incoming API request.

For example, a scheduled job can retrieve data from an external system, send records to another service, generate files, refresh derived data, or send reminders without manual action.

This article shows how to create a job handler, configure a scheduled job, preview the schedule, and review the result in Job Log. Before you create a scheduled job, prepare the following:

  • An Executor that identifies the backend service that can run the job.
  • A backend Job Handler that contains the integration or processing logic.
  • A Job record that links the executor, job handler, and schedule.

How job scheduling works​

The executor identifies the backend service that can run scheduled jobs. The job handler contains the code that performs the integration or processing work. The job record defines when and how the job handler runs.

When the schedule is active, KAIZEN triggers the job based on the configured cron expression. The executor receives the request and runs the matching job handler. Each execution is recorded in Job Log, where administrators can review the trigger result, handler result, status, and execution messages.

Configure an executor​

note

You need the admin rights to use this feature.

Before creating a scheduled job, configure an executor for the service that will run the job.

For example, if a job handler is implemented in the scholarship service, create or use an executor whose service name points to scholarship.

Refer to Executors for more information.

Create a job handler​

A job handler contains the backend logic that KAIZEN runs when the job is triggered. Create the job handler in the backend service that belongs to the executor.

For integration scenarios, the job handler can call internal services, invoke configured external APIs, process records, or write status messages for administrators to review later.

To create a job handler, perform the following:

  1. Create a class that extends IJobHandler.

  2. Annotate the class with @JobHandler.

  3. Set the @JobHandler value. This value is the job handler ID that administrators select when creating the job.

    The following shows an example:

    import com.ecquaria.lowcode.job.handler.IJobHandler;
    import com.ecquaria.lowcode.job.handler.annotation.JobHandler;

    @JobHandler(value = "PdfGenerationJobHandler")
    public class PdfGenerationHandler extends IJobHandler {
    // Job execution logic
    }
    Job handler code example

The job handler can write custom execution messages by using JobLogger. These messages are visible from the Job Log details.

note

You need the admin rights to use the features below.

Create a scheduled job​

After the executor and job handler are available, create a Job record.

To create a job, perform the following:

  1. In Job Scheduler/ Job, click Create.

  2. In the Create Job window, provide the details:

    Create job

    The following table describes each field from the window above:

    FieldRequiredDescription
    User DomainYesDisplays the user domain where the job is created.
    Job NameYesEnter the display name of the scheduled job.
    ExecutorYesSelect the executor service responsible for executing the job.
    CronYesEnter the Quartz cron expression that defines the job schedule.
    Validity Start Date/TimeNoSelect when the job becomes active.
    Validity End Date/TimeNoSelect when the job becomes inactive.
    Job HandlerYesEnter the backend job handler ID. This must match the value defined in the @JobHandler annotation.
    Job ParamNoEnter optional parameters to pass to the job handler when the job runs.
    Route StrategyYesSelect the strategy used to route the job to an executor.
    Block StrategyYesSelect the strategy used to handle conflicts when a previous execution is still running.
    Job Timeout PeriodNoEnter the maximum duration, in seconds, that the job is allowed to run before timing out.
    Job DescriptionNoEnter optional remarks or notes for the job.
    Schedule ForecastNoShows predicted upcoming execution times for the configured cron expression.
  3. Click Save.

Route strategies​

StrategyDescription
Round RobinDistributes jobs sequentially to executors across application instances. Use this for high availability setups with multiple instances.
StickyAssigns the job to an executor for consistent handling.
BroadcastExecutes the job on all executors across all application instances simultaneously. Use this when the task must run across every instance.

Block strategies​

StrategyDescription
Serial ExecutionWaits for the current execution to finish before running the next one.
Discard LaterDiscards the incoming execution if the previous execution has not finished.
note

If a job is blocked and cannot complete, the Job Timeout Period controls when KAIZEN terminates the job.

Preview the schedule​

To preview the schedule, perform the following:

  1. In the Create or Edit Job window, turn on Schedule Forecast.

  2. Select the number of upcoming execution times to display.

  3. Click Refresh.

Preview schedule

Run or start a job​

Administrators can run a job once or start a job according to its configured schedule.

To run or start a job, perform the following:

  1. In Job Scheduler > Job, select the job.

  2. Click More, then select one of the following actions:

    ActionDescription
    RunTriggers the job once.
    StartRegisters the job so it runs according to the configured schedule.

After a job is started, its status changes to Registered.

Review job execution​

Use Job Log to confirm that scheduled jobs are running as expected.

To review job execution, perform the following:

  1. In the KAIZEN studio console, on the left panel, click Job Scheduler > Job Log.

  2. Review the trigger time, handler time, trigger result, handler result, status, and log details.

  3. For scheduled jobs, compare the Trigger Date values with the job cron expression to confirm that the job is triggered at the expected interval.

Refer to Job log for more information.

Last updated on 19 Oct 2026