When workloads require sub-minute scheduling -- continuous data polling, near-real-time monitoring, or high-frequency batch processing -- standard cron-based jobs fall short. Second-delay jobs in SchedulerX run at fixed intervals measured in seconds, so you can process time-sensitive tasks with minimal latency. Combined with the memory grid model, second-delay jobs continuously handle large data volumes.
Use cases
| Scenario | How second-delay jobs help |
|---|---|
| Continuous data synchronization | Poll upstream data sources every few seconds and push updates downstream |
| Near-real-time monitoring | Check system metrics or business indicators at short intervals and trigger actions when thresholds are exceeded |
| High-frequency batch processing | Process queued tasks in rapid succession using the memory grid model |
How it works
A second-delay job is a periodic job that SchedulerX triggers at a fixed interval measured in seconds. The following job types support second-delay scheduling:
Simple Java jobs
Distributed Java jobs
Java scripts
You can also use different methods to execute second-delay jobs.
Create a second-delay job
To enable second-delay scheduling, configure the following settings when you create a job:
| Parameter | Value | Description |
|---|---|---|
| Time type | second_delay | Switches the job to second-level scheduling |
| Fixed delay | 50 seconds | The number of seconds between consecutive triggers |
View execution details
Second-delay jobs add a Historical execution records tab to the Task instance records page. This tab supplements the standard job execution details with the following records:
| Record | Description |
|---|---|
| Execution records on the current day | Total triggers, successes, and failures since the job first ran on the current day |
| Execution records on the previous day | Total triggers, successes, and failures from the first trigger to the end of the previous day |
| Recent results | The 10 most recent execution results, including the number of distributed tasks, successful tasks, and failed tasks at each level |
Configure alerting
SchedulerX provides two built-in alert types for second-delay jobs. To receive alerts, turn on the alerting switch in the job's alerting settings.
| Alert type | Trigger condition |
|---|---|
| Execution failure alert | Fires on the first execution failure of a second-delay job. |
| Consecutive execution failure alert | Fires when the job completes successfully at least once and then fails more than 10 consecutive times. |
See also
Create a job -- Full job creation reference
Job execution lists -- Monitor job instances and task details