Job types

Updated at:

Job scheduling supports the following job types.

Simple jobs

Simple jobs are the most basic job type and are suitable for scenarios with simple business logic. A simple job corresponds to a single handler and supports the sharding and step features:

  • The sharding feature allows for concurrent execution when resource utilization is not a concern.

  • The step feature lets you divide a job into several steps that execute in sequence.

Cluster jobs

Cluster jobs are suitable for complex scheduling scenarios. You can use custom splitting logic to split a large job into smaller jobs that run concurrently on multiple clients.

A cluster job has two phases: the splitting phase and the execution phase.

  • Splitting phase: The data is partitioned, with no limit on the number of splitting layers. The results are reported to the server-side, which then uses the resulting chunks to notify clients to pull and process the data. A chunk is a collection of data shards that are ready to be processed.

  • Execution phase: After a client receives a notification, it pulls and processes the data. The client continues to pull new data until all data is processed.

Topology Jobs

A job topology is a special type of job that represents a collection of jobs. While the job topology itself can be started by a CRON expression or an event trigger, its sub-jobs must be started by an event trigger and use CALLBACK as the communication method. The execution flow of jobs in a job topology starts from a start node, ends at an end node, and forms a directed acyclic graph.