Font Size:
Ask Joget AI

Scheduler Plugin

Introduction

The Scheduler Plugin allows you to schedule tasks to run automatically in your Joget application at a specific date and time. You can use this plugin to trigger any process tools (except the Form Data Update Tool, which only runs in a process flow).

For example, you can configure the Scheduler Plugin to call a JSON POST API to start a process every day at 8:00 am throughout September. This process could be set to update database records and send email notifications.

The Scheduler Plugin uses Java Cron Expressions to define when tasks will run. A Cron Expression is a string made up of six or seven parts that specify the timing details. These fields, separated by spaces, contain values and characters that tell the system when the task should be executed. Only future dates are allowed when using cron expressions.

You can access the source code for this plugin at JogetOSS's open-source repository. JogetOSS is a community-led initiative for developing open-source tools for the Joget no-code/low-code platform. You are welcome to contribute to these projects.

Plugin information

  • Plugin Name: Scheduler Plugin
  • Joget DX Compatibility: Joget DX 7.0.7 and onwards

This plugin is not compatible with Joget Cloud (Shared) and was designed to work only in Joget On-Premise or Joget Cloud Managed Services.

Get started

Where to get the plugin

How to install the plugin

  1. Download the plugin JAR file from the releases page.
  2. Go to Settings > Manage Plugins > Upload Plugin.
  3.  You can import the demo app or create the app from scratch.

How to use it 

  1. To access the Scheduler menu in your app, add a Scheduler menu inside your UI.
  2. Publish and run the UI.
  3. Access the Scheduler Menu and create a new task.
  4. In this example, you will create a task that adds a new record daily at 00:00.

Configure scheduler menu properties

Fields to configure:

  • Job Name: The label for the scheduled job.
  • Cron Expression: A string comprising six or seven fields separated by white space representing a set of times, generally as a schedule to execute some routine.
You can generate cron expressions using an online Cron Expression Generator.
  • App: The selected app for the task.
  • Plugin: Select from a list of tools to schedule:
    • BeanShell
    • Counter Increment
    • SQL Query
    • Email
    • Export Form Email
    • File Add Image Tool
    • Update Form Date

    and many more.

Scheduler Management

Once a scheduler job has been created, it can be managed from the Scheduler Menu.

Available actions include:

  • Enable – Starts the selected scheduler job.
  • Disable – Stops the selected scheduler job.
  • Edit – Updates the scheduler configuration.
  • Logs – View execution logs for the scheduler job.
  • Delete – Removes the scheduler job permanently.

The Status column indicates whether the scheduler is currently enabled or disabled.

Scheduler Web Service API

The Scheduler Plugin provides REST endpoints for managing scheduler jobs programmatically. These APIs allow administrators to retrieve scheduler jobs, enable or disable jobs, delete jobs, and manage the scheduler thread pool.

Base URL http://<host>:<port>/jw/web/json/plugin/org.joget.scheduler.SchedulerWebService/service

Note: If you prefer to call these endpoints using cleaner REST-style URLs, you can use the Web Service REST Mapper plugin to map friendly paths onto the endpoints below — for example GET /jw/scheduler/jobs/{jobId} in place of GET {baseUrl}?action=job&id={jobId}.

1. Get all scheduler jobs: Returns all scheduler jobs.

GET {baseUrl}?action=jobs

2. Get a scheduler job: Returns details for a specific scheduler job.

GET {baseUrl}?action=job&id={jobId}

3. Enable a scheduler job: Enables the specified scheduler job.

POST {baseUrl}?action=enable&id={jobId}

4. Disable a scheduler job: Disables the specified scheduler job.

POST {baseUrl}?action=disable&id={jobId}

5. Delete a scheduler job: Deletes the specified scheduler job.

DELETE {baseUrl}?action=delete&id={jobId}

6. Get scheduler thread count: Returns the current scheduler thread pool size.

GET {baseUrl}?action=threadCount

Example response:

{
 "effectiveThreadCount": 5,
 "restartRequired": false,
 "configuredThreadCount": 5
}

7. Update scheduler thread count: Updates the scheduler thread pool size.

PUT {baseUrl}?action=threadCount
Content-Type: application/json

Request body

{
  "threadCount": 10
}

Scheduler Thread Pool

The Scheduler Plugin executes jobs using a shared thread pool.

  • By default, the thread pool size is 5.
  • Up to five scheduler jobs can execute concurrently.
  • Additional jobs remain queued until a thread becomes available.

The thread pool size can be updated using the Scheduler Web Service API.

Note: Changes to the thread pool size take effect only after restarting Joget, as the scheduler initializes its thread pool during application startup.

Authentication and Authorization

All Scheduler Web Service requests require HTTP Basic Authentication using valid Joget administrator credentials. 
Authentication is performed by Joget before the request reaches the Scheduler Plugin.

Requirements:

  • Requests must include an Authorization header using Basic Authentication.
  • The authenticated user must have the ROLE_ADMIN role.

Exporting scheduler data

when you export an app, it will not include the scheduler records by default, so you will have to handle this separately. To ensure that your scheduled job configurations are successfully promoted across environments, you will need to perform a manual data export and import of the Scheduler data records, specifically for the sch_job_def table, which stores the Scheduler job definitions.

Here is how you can do it:

  1. Export the Scheduler Data:
    • Use a database utility like SQLyog (for MySQL/MariaDB) or any other SQL client to connect to your Joget development environment's database.
    • Export the contents of the sch_job_def table into a .sql file.
  2. Import the Scheduler Data:
    • Connect to your test environment’s database using the same SQL client.
    • Import the .sql file into the test environment's database, ensuring that the sch_job_def table is populated with the necessary job configurations.
  3. Edit and Start Scheduler Jobs:
    • After importing the application and the sch_job_def database records into your Joget test environment, go to the userview where the Scheduler is configured.
    • Click to edit each scheduled job record to ensure the settings are correct, and then start the scheduler jobs as needed.

This process should successfully transfer your scheduled job configurations from the development environment to the test environment.

Expected outcome

After completing the setup, you will be able to:

  • Create scheduled jobs from the Scheduler Menu.
  • Enable, disable, edit, and delete scheduler jobs.
  • Monitor scheduler execution logs.
  • Manage scheduler jobs programmatically using the Scheduler Web Service API.
  • Configure the scheduler thread pool size through the API.

Related documentation

Download plugin

Download demo app

Download the demo app for Scheduler Plugin:
Created by Julieth Last modified by Nabila Jahan on Aug 06, 2026