The difference between the timer and module of the batch job scheduling tool taskctl

Time:2021-6-5

Software Acquisition: official accounttaskctl”Reply content“Receive”or“Software”that will do

The main process, sub process and timer all belong to the control container; Each control container contains one or more modules; Define specific jobs in the module.

The relationship among main process, sub process, timer and module

The difference between the timer and module of the batch job scheduling tool taskctl

Expression of main process, sub process, timer and module in resource tree

The difference between the timer and module of the batch job scheduling tool taskctl

  • Control container:It is the largest organization unit of job and an independent and complete scheduling control agent. In the actual running process, each control container is also equivalent to a program, and there is a corresponding process on the server side. Therefore, each control container has the characteristic of independent start stop (activation) operation in monitor.
  • modular: in taskctl, the job definition information of process and timer is organized by XML format code, and the specific code information is stored in each module file. At the same time, in order to facilitate management, a process or timer can also be composed of multiple module code information. Second, it’s like a program. Each program has an entry main function class, and the taskctl process also has a main module entry.
  • Process and timer:Process and timer are different control containers, with an obvious conceptual distinction. The organization of processes to jobs is orderly, while timers are disordered, and there is no relationship between jobs. Taskctl is a relatively complete controller system formed by the two organizational forms of order and disorder.
  • Main process and sub process:From a technical point of view, the mainstream process is equivalent to a guardian process. Once it runs, except for non-human or abnormal exit, it will stay in memory. Its internal process is a dead cycle, from the beginning to the end, it will cycle again; The subprocess, relative to an ordinary program, will automatically exit after running.

Second, the main uses and application scenarios of main process, sub process and timer.

one   Generally speaking, the jobs with sequence logic relationship are organized by process, while the discrete jobs without logic relationship (only jobs with different time frequency) are organized by timer.

two   Sub process, which is mainly used for the organization of business logic job flow; The main process, generally used for logic trigger control, is used to trigger the call of sub process

Third, use several examples to deepen the understanding of the main process, sub process, timer’s main use and application scenarios

1Timer for discrete call processing

The difference between the timer and module of the batch job scheduling tool taskctl

2 Business sub process

The difference between the timer and module of the batch job scheduling tool taskctl

Use sub process to organize specific business process

3 Trigger control main flow

The main process is mainly used for the trigger control of the process. In this case, the file reaches the trigger control.

The difference between the timer and module of the batch job scheduling tool taskctl

In fact, if the trigger control of business sub process is simple timing trigger, timer is recommended; But if it is some complex process trigger control, we must use the main process to trigger control.

4 A complex example of main process trigger control

The difference between the timer and module of the batch job scheduling tool taskctl

Corresponding code

The difference between the timer and module of the batch job scheduling tool taskctl

This example is called at 8, 10 and 16 o’clock every week at 1, 3 and 4“My business process”