CN110688212A - Timing management method and system based on quartz - Google Patents

Timing management method and system based on quartz Download PDF

Info

Publication number
CN110688212A
CN110688212A CN201910915180.9A CN201910915180A CN110688212A CN 110688212 A CN110688212 A CN 110688212A CN 201910915180 A CN201910915180 A CN 201910915180A CN 110688212 A CN110688212 A CN 110688212A
Authority
CN
China
Prior art keywords
task
execution
scheduling
state
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910915180.9A
Other languages
Chinese (zh)
Inventor
张鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN201910915180.9A priority Critical patent/CN110688212A/en
Publication of CN110688212A publication Critical patent/CN110688212A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Factory Administration (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a timing management method and a timing management system based on Quartz, belongs to the field of task scheduling, and aims to solve the technical problem of how to realize task management and timing scheduling based on Quartz. The method comprises the following steps: configuring and storing basic information of a task; uploading the basic information of the task to a task scheduling factory; and for the task with the task state as the starting state, acquiring a scheduler instance from a scheduling factory, instantiating the scheduler instance according to a corresponding scheduling setting mode to form a scheduling object, starting a scheduling thread to execute the task, and returning the scheduling execution state and the execution result of the task. The system comprises a management module, a judgment management module, a dispatching factory, an immediate execution module and a database.

Description

Timing management method and system based on quartz
Technical Field
The invention relates to the field of task scheduling, in particular to a timing management method and system based on quartz.
Background
Quartz is an open source job scheduling framework written entirely by java, and the core of the Quartz framework is a scheduler which is responsible for managing the Quartz application runtime environment. The scheduler does not do all the work on its own, but relies on some very important components within the framework. Quartz is not just thread and thread management. To ensure scalability, Quartz employs a multi-thread based architecture. At startup, the framework initializes a set of worker threads that are used by the scheduler to execute predetermined jobs. This is the principle of how Quartz can run multiple jobs concurrently. Quartz relies on a set of loosely coupled thread pool management components to manage thread contexts. The core of the Quartz framework is the scheduler. The scheduler is responsible for managing the Quartz application runtime environment. The scheduler does not do all the work on its own, but relies on some very important components within the framework. Quartz is not just thread and thread management. To ensure scalability, Quartz employs a multi-thread based architecture. At startup, the framework initializes a set of worker threads that are used by the scheduler to execute predetermined jobs. Based on the above principles, Quartz is capable of running multiple jobs concurrently. Quartz relies on a set of loosely coupled thread pool management components to manage thread contexts.
At present, the proportion of the labor cost in the company business is getting larger and larger, and in order to reduce the labor cost, a user does not need to manually execute a task at a certain moment, and the task needs to be executed regularly by means of an automatic execution technology. Based on the Quartz working principle and the advantages, how to realize the management and the timing scheduling of tasks based on Quartz is a technical problem to be solved.
Disclosure of Invention
Aiming at the defects, the technical task of the invention is to provide a timing management method and a timing management system based on Quartz to solve the problem of how to realize the management and timing scheduling of tasks based on Quartz.
In a first aspect, the present invention provides a timing management method based on quartz, which is used for managing and timing regulating tasks, and the method includes the following steps:
configuring and storing basic information of tasks, wherein the basic information comprises but is not limited to a task code, a task name, an execution job, a task state and a scheduling setting mode, the task state comprises enabling and disabling, and the enabling is to execute the tasks at regular time according to the scheduling setting mode;
for the task with the task state as the starting state, acquiring a scheduler instance from a scheduling factory, instantiating the scheduler instance according to a corresponding scheduling setting mode to form a scheduling object, starting a scheduling thread to execute the task, and returning the scheduling execution state and the execution result of the task;
the task scheduling factory is a task scheduler based on a quartz framework.
Preferably, the method further comprises:
for the task needing to be executed immediately, an immediate execution instruction is triggered manually;
based on the immediate execution instruction, acquiring basic information of the task and judging the task state of the task;
if the task state is enabled, executing the task through a single thread, and returning the scheduling execution state and the execution result of the task;
and if the task state is disabled, prohibiting the task from being executed.
Preferably, for a task to be executed immediately, if the task state is disabled, the task is prohibited from being executed, basic information of the task is configured and stored, and the task state of the task is changed to be enabled.
Preferably, the method further comprises the following steps:
and generating and returning a log of the task based on the basic information of the task, the execution process of the task and the scheduling execution state and execution result of the task.
Preferably, basic information of tasks is configured, viewed and realized through a timing management interface, and the basic information of the tasks is stored through a database;
checking and displaying the scheduling execution state and the execution result of the task through a timing management interface, and storing the scheduling execution state and the execution result of the task through a database;
and checking, displaying and downloading the task log through a timing management interface, and storing the task log through a database.
Preferably, the basic information further includes a next execution time, a run time, a last execution time, a creator, a creation time, an update time, and a modifier;
the log of the task comprises an execution result, a running time, a creator, a creation time and an execution mode of the task, wherein the execution mode comprises timing execution and manual execution.
Preferably, the scheduling setting mode includes:
the scheduling type is the task execution times and comprises periodic execution, sequential execution and custom execution;
and the cycle type is a task execution cycle and comprises year, month, week, day, time, minute and interval time.
Preferably, the dispatching factory is configured with a SimpleTrigger trigger and a CronTrigger trigger;
if the scheduling type of the task is periodically executed and the time interval is minutes, executing the task at fixed time through a SimpleTrigger trigger;
if the scheduling type of the task is periodically executed and the time interval is the interval time beyond the minute, the task is executed regularly through a CronTrigger trigger;
and if the scheduling type of the task is self-defined execution and the execution time is started to be greater than the current time, executing the task at fixed time through a CronTrigger trigger.
In a second aspect, the present invention provides a quartz-based timing management system, which manages and regulates tasks at regular time by using the quartz-based timing management method according to any one of the first aspect, and the system includes:
the management module is used for configuring basic information of the tasks and generating configuration information, the basic information comprises but is not limited to a task code number, a task name, an execution job, a task state and a scheduling setting mode, the task state comprises enabling and disabling, and the enabling is to execute the tasks at regular time according to the scheduling setting;
the judging module is used for reading the basic information of the task and judging the task state of the task;
the scheduling factory is a task scheduler based on a quartz frame and is used for allocating a scheduler instance to a task of which the task state is enabled, instantiating the scheduler instance to form a scheduling object according to a corresponding scheduling setting mode, enabling a scheduling thread to execute the task, and returning the scheduling execution state and the execution result of the task;
the immediate execution module is used for calling the judgment module to judge the task state of the task, executing the task through an independent thread if the task state is enabled, returning the scheduling execution state and the execution result of the task, and forbidding the task to be executed if the task state is disabled;
the database is used for storing the basic information of the tasks, the execution condition of the tasks and the scheduling execution state and execution result of the tasks, and generating a log of the tasks based on the basic information of the tasks, the execution condition of the tasks and the scheduling execution state and execution result of the tasks;
the management module is provided with a timing management interface which is used for checking and displaying the basic information of the task, the scheduling execution state and execution result of the task and the log of the task, and downloading the log of the task.
Preferably, the dispatching factory is configured with a SimpleTrigger trigger and a CronTrigger trigger;
if the scheduling type of the task is periodically executed and the time interval is minutes, executing the task at fixed time through a SimpleTrigger trigger;
if the scheduling type of the task is periodically executed and the time interval is the interval time beyond the minute, the task is executed regularly through a CronTrigger trigger;
and if the scheduling type of the task is self-defined execution and the execution time is started to be greater than the current time, executing the task at fixed time through a CronTrigger trigger.
The timing management method and system based on quartz of the invention have the following advantages:
1. the basic information of the user configured task comprises a scheduling mode, a scheduling factory generates a task thread according to the basic information, the task thread executes the task at regular time according to the scheduling mode and returns the execution state and the execution result of the task, so that the task scheduled at regular time is convenient to check and transparent;
2. generating configuration information when configuring the task, generating a log according to the configuration information, the execution state of the task and the execution result, and enabling a user to check and know the relevant information of the task through the log so as to realize the transparency of the task scheduled at regular time;
3. the method and the device realize the setting of various task scheduling modes, and a user can configure the scheduling modes according to service requirements, so that the method and the device are suitable for different service scenes.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a flow chart of a timing management method based on quartz in embodiment 1;
FIG. 2 is a schematic diagram of a timing management interface in the timing management method based on quartz in embodiment 1;
FIG. 3 is a schematic diagram showing the arrangement of basic information in the timing management method based on quartz in embodiment 1;
FIG. 4 is a schematic diagram showing a log of tasks in the timing management method based on quartz in example 1.
Detailed Description
The present invention is further described in the following with reference to the drawings and the specific embodiments so that those skilled in the art can better understand the present invention and can implement the present invention, but the embodiments are not to be construed as limiting the present invention, and the embodiments and the technical features of the embodiments can be combined with each other without conflict.
The embodiment of the invention provides a timing management method and a timing management system based on Quartz, which are used for solving the technical problem of how to realize task management and timing scheduling based on Quartz.
Example 1:
the timing management method based on quartz is used for managing tasks and timing regulation and control.
The method comprises the following steps:
s100, configuring and storing basic information of the tasks, wherein the basic information comprises but is not limited to a task code, a task name, an execution job, a task state and a scheduling setting mode, the task state comprises enabling and disabling, and the enabling is to execute the tasks regularly according to the scheduling setting mode;
s200, judging the task state of the task based on the basic information of the task, and calling a task scheduling factory for the task with the task state being started, wherein the task scheduling factory is a scheduler based on quartz;
s300, for the task with the task state being enabled, a scheduler instance is obtained from a scheduling factory, the scheduler instance is instantiated according to the corresponding scheduling setting mode to form a scheduling object, a scheduling thread is enabled to execute the task, and the scheduling execution state and the execution result of the task are returned.
The configured basic information further comprises next execution time, operation time, last execution time, a creator, creation time, update time, a modifier and the like, the scheduling setting mode comprises a scheduling type and a cycle type, and the scheduling type is the number of times of task execution and comprises cycle execution, sequential execution and custom execution; the cycle type is a task execution cycle including year, month, week, day, hour, minute, and interval time, and the interval time can be selected by a drop-down box. The basic information is specifically shown in table 1.
Table 1:
Figure BDA0002215919870000061
Figure BDA0002215919870000071
the dispatch factory is configured with a SimpleTrigger trigger and a CronTrigger trigger. If the scheduling type of the task is periodically executed and the time interval is minutes, executing the task at fixed time through a SimpleTrigger trigger; if the scheduling type of the task is periodically executed and the time interval is the interval time except minutes, executing the task regularly through a CronTrigger trigger; and if the scheduling type of the task is self-defined execution, executing the task at regular time through a CronTrigger trigger. If the task is scheduled to be executed once, the task is executed in a timed mode through a cronTrigger trigger, whether the execution starting time is larger than the current time or not is judged before the execution, and the scheduling is set only when the execution starting time is larger than the current time.
In order to support the emergency execution of the task burst, the present embodiment also supports manual execution, which is: and for the task needing to be executed immediately, manually triggering an immediate execution instruction, acquiring basic information of the task based on the immediate execution instruction, judging the task state of the task, executing the task through an independent thread if the task state is enabled, and returning the scheduling execution state and the execution result of the task. In the embodiment, manual execution is scheduled by an immediate execution module independent of the scheduling factory.
In order to realize the immediate execution of the task in the forbidden state, the basic information of the task is reconfigured, namely edited, the task state of the task is changed into enabled state, the reconfigured basic information is updated to a database, for the task of which the reconfigured task state is enabled, a scheduler instance is obtained from a scheduling factory, the scheduler instance is instantiated according to a corresponding scheduling setting mode to form a scheduling object, a scheduling thread is enabled to execute the task, and the scheduling execution state and the execution result of the task are returned.
The timed management method based on qurtz disclosed by the embodiment supports automatic execution and manual execution, for the task with the task state being enabled, a scheduling factory allocates the scheduler instance, instantiates the scheduler instance to generate a scheduling object according to a scheduling setting mode, enables the scheduling thread to execute the task at regular time, and returns the execution state and the execution result of the task, thereby realizing the automatic execution of the task; and after the user manually triggers to immediately execute the task, executing the task by using a single thread for the task with the task state as the starting state, and returning the scheduling execution state and the execution result of the task, thereby realizing the manual execution of the task.
According to the improvement, a log of the task is generated in the database according to the basic information of the task, the execution condition of the task and the returned execution state and execution result of the task, the log of the task comprises the execution result, the running time, the creator, the creation time and the execution mode of the task, and the execution mode comprises timing execution and manual execution.
In order to realize the transparency of task management and scheduling, basic information of the tasks is configured, checked and displayed through a timing management interface, the basic information of the tasks is stored through a database, the scheduling execution state and the execution result of the tasks are checked and displayed through the timing management interface, and the scheduling execution state and the execution result of the tasks are stored through the database; and checking, displaying and downloading the task log through a timing management interface.
When the basic information of the task is configured through the timing management interface, the timing management interface is as shown in fig. 2, the basic information is as shown in fig. 3, and the log of the task is as shown in fig. 4.
In the timing management interface of this embodiment, function keys such as add, delete, enable, disable, refresh, edit, view, execute immediately, log, and the like are configured.
And the newly added function keys correspond to the configuration function modules, and after the newly added function keys are triggered, basic information of the tasks is created and configured through the configuration function modules.
An editing function key is arranged at each task, the editing function key corresponds to a configuration function module, and after the editing function key is triggered, basic information of the task can be reconfigured through the configuration function module for the task in a forbidden state.
When the basic information of the task is configured through the configuration function module, a task code, a task name, an execution job and a task description are required to be filled, a task state, a scheduling type and a period type are selected, the configuration information is stored after the configuration is completed, and the basic information of the task is stored in a database. And simultaneously uploading the configured information to a dispatching factory.
And deleting the information about the task in the database and the scheduling factory by the deleting function module for the task with the task state of forbidden by triggering the back key of the deleting function key.
The starting function key corresponds to the judging management module, the judging management module judges the task state of the task, the judging management module calls a scheduling factory for the task with the started task state, and the scheduling factory executes the task at regular time according to a scheduling setting mode.
And the forbidden function key corresponds to the judgment management module, the forbidden function key is triggered, the judgment management module judges the task state of the task, and the corresponding scheduling thread in the scheduling factory is deleted for the task with the forbidden task state.
The refreshing function key corresponds to the refreshing function module, and after the refreshing function key is triggered, the refreshing function module can update and display information on the timing management interface.
The checking function key corresponds to the checking function module, the checking function key is triggered, and the database can be read through the checking function module to check detailed information of the task, including basic information, the execution state of the task and the execution result.
The immediate execution function key corresponds to the immediate execution function module, when the user manually triggers the immediate execution function key, the immediate execution function module judges whether the task state of the task is enabled, if so, the task is executed through the thread, and if not, the task is not executed.
The log function key corresponds to the log function module, and the log function module can read and display the log of the task from the database. The log function module supports viewing and downloading of logs of tasks.
According to the timed management method based on the qurtz, after basic information of a task is configured through the timed management interface, the basic information is stored in the database and is uploaded to the scheduling factory, the task is executed in the scheduling factory at fixed time according to a scheduling setting mode, and the execution state and the execution result of the task are returned, so that automatic execution of the task is realized, the execution state and the execution result of the task can be checked in time through the timed management interface, and the execution condition of the task can be known conveniently; for the task needing to be executed immediately, the immediate execution instruction is triggered manually through the timing management interface, for the enabled task, the task is executed through the thread, the scheduling execution state and the execution result of the task are returned, and the execution state and the execution result of the task can be checked in time through the timing management interface, so that the manual execution of the task is realized.
Example 2:
the timing management system based on quartz comprises a management module, a judgment management module, a dispatching factory, an immediate execution module and a database.
The management module is used for configuring basic information of the tasks and generating the configuration information, wherein the basic information comprises but is not limited to a task code number, a task name, an execution job, a task state and a scheduling setting mode, the task state comprises enabling and disabling, and the enabling is that the tasks are executed at regular time according to the scheduling setting.
And the judgment management module is used for reading the basic information of the task from the database and judging the task state of the task.
The scheduling factory is a task scheduler based on a quartz framework and is used for allocating a scheduler instance to a task with a task state being enabled, instantiating the scheduler instance according to a corresponding scheduling setting mode to form a scheduling object, enabling a scheduling thread to execute the task, and returning a scheduling execution state and an execution result of the task.
The immediate execution module is used for calling the judgment management module to judge the task state of the task, executing the task through a single thread if the task state is enabled, returning the scheduling execution state and the execution result of the task, and forbidding the task to be executed if the task state is disabled.
The database is used for storing the basic information of the tasks, the execution condition of the tasks, the scheduling execution state and the execution result of the tasks and generating the logs of the tasks based on the basic information of the tasks, the scheduling execution state and the execution result of the tasks.
The management module is provided with a timing management interface which is used for configuring, checking and displaying basic information of the tasks, the execution condition of the tasks, the scheduling execution state and execution result of the tasks and the logs of the tasks, and downloading the logs of the tasks.
The basic information supported by the management module to be configured also comprises next execution time, operation time, last execution time, a creator, creation time, update time, a modifier and the like, the scheduling setting mode comprises a scheduling type and a cycle type, and the scheduling type is the number of task execution times and comprises cycle execution, sequential execution and custom execution; the cycle type is a task execution cycle including year, month, week, day, hour, minute, and interval time, and the interval time can be selected by a drop-down box.
The log of the task comprises an execution result, a running time, a creator, a creation time and an execution mode of the task, wherein the execution mode comprises timing execution and manual execution.
Specifically, the management module in this embodiment includes a plurality of functional modules, which are respectively: the device comprises a configuration module, a deletion module, a judgment management module, a refreshing module, a viewing module and a log module. The timing management interface formed by the management module is provided with function keys such as adding, deleting, enabling, disabling, refreshing, editing, checking, immediate executing, logging and the like.
And the configuration module corresponding to the newly added function key creates and configures the basic information of the task through configuration after the newly added function key is triggered.
An editing function key is arranged at each task, the editing function key corresponds to a configuration module, and after the editing function key is triggered, basic information of the task can be reconfigured through the configuration module for the task in a forbidden state.
When the basic information of the task is configured through the configuration module, a task code number, a task name, an execution job and a task description are required to be filled, a task state, a scheduling type and a period type are selected, the configuration information is stored after the configuration is completed, and the basic information of the task is stored in a database. And simultaneously uploading the configured information to a dispatching factory.
And deleting the information about the task in the database and the scheduling factory by the deletion module for the task with the task state of forbidden by triggering the delete function key corresponding to the deletion module and deleting the selected task.
The starting function key corresponds to the judging management module, the judging management module judges the task state of the task, the judging management module calls a scheduling factory for the task with the started task state, and the scheduling factory executes the task at regular time according to a scheduling setting mode.
And the forbidden function key corresponds to the judgment management module, the forbidden function key is triggered, the judgment management module judges the task state of the task, and the corresponding scheduling thread in the scheduling factory is deleted for the task with the forbidden task state.
The refreshing function key corresponds to the refreshing module, and after the refreshing function key is triggered, the information on the timing management interface can be updated and displayed.
The checking function key corresponds to the checking module, the checking function key is triggered, and the database can be read through the checking module to check detailed information of the task, including basic information, the execution state of the task and the execution result.
The log function key corresponds to the log module, and the log module can read and display the log of the task from the database. The log module supports viewing and downloading of logs of tasks.
The immediate execution function key corresponds to an immediate execution module, when a user manually triggers the immediate execution function key, the immediate execution module judges whether the task state of the task is enabled, if so, the task is executed through a thread, and if not, the task is not executed.
The dispatch factory is configured with a SimpleTrigger trigger and a CronTrigger trigger. If the scheduling type of the task is periodically executed and the time interval is minutes, executing the task at fixed time through a SimpleTrigger trigger; if the scheduling type of the task is periodically executed and the time interval is the interval time except minutes, executing the task regularly through a CronTrigger trigger; and if the scheduling type of the task is self-defined execution, executing the task at regular time through a CronTrigger trigger. If the task is scheduled to be executed once, the task is executed in a timed mode through a cronTrigger trigger, whether the execution starting time is larger than the current time or not is judged before the execution, and the scheduling is set only when the execution starting time is larger than the current time.
The timing management system based on quartz can manage and regulate tasks in a timing mode through the timing management method based on quartz disclosed in the embodiment 1.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.

Claims (10)

1. The timing management method based on quartz is characterized by being used for managing and timing regulation and control of tasks, and comprises the following steps:
configuring and storing basic information of tasks, wherein the basic information comprises but is not limited to a task code, a task name, an execution job, a task state and a scheduling setting mode, the task state comprises enabling and disabling, and the enabling is to execute the tasks at regular time according to the scheduling setting mode;
for the task with the task state as the starting state, acquiring a scheduler instance from a scheduling factory, instantiating the scheduler instance according to a corresponding scheduling setting mode to form a scheduling object, starting a scheduling thread to execute the task, and returning the scheduling execution state and the execution result of the task;
the task scheduling factory is a task scheduler based on a quartz framework.
2. The method for qrutz-based timing management according to claim 1, wherein the method further comprises:
for the task needing to be executed immediately, an immediate execution instruction is triggered manually;
based on the immediate execution instruction, acquiring basic information of the task and judging the task state of the task;
if the task state is enabled, executing the task through a single thread, and returning the scheduling execution state and the execution result of the task;
and if the task state is disabled, prohibiting the task from being executed.
3. The qrutz-based timing management method according to claim 2, wherein for a task that needs to be executed immediately, if the task state is disabled, the task is disabled, and basic information of the task is configured and stored, and the task state of the task is changed to enabled.
4. The method for qrrtz-based timing management according to claim 1, 2 or 3, characterized by further comprising:
and generating and returning a log of the task based on the basic information of the task, the execution process of the task and the scheduling execution state and execution result of the task.
5. The quartz-based timing management method according to claim 4, wherein basic information of the task is configured, viewed and displayed through the timing management interface, and the basic information of the task is stored through the database;
checking and displaying the scheduling execution state and the execution result of the task through a timing management interface, and storing the scheduling execution state and the execution result of the task through a database;
and checking, displaying and downloading the task log through a timing management interface, and storing the task log through a database.
6. The quartz-based timing management method according to claim 4, wherein the basic information further includes a next execution time, a run time, a last execution time, a creator, a creation time, an update time, and a modifier;
the log of the task comprises an execution result, a running time, a creator, a creation time and an execution mode of the task, wherein the execution mode comprises timing execution and manual execution.
7. The qrutz-based timing management method according to claim 1, 2 or 3, wherein the scheduling setting comprises:
the scheduling type is the task execution times and comprises periodic execution, sequential execution and custom execution;
and the cycle type is a task execution cycle and comprises year, month, week, day, time, minute and interval time.
8. The qrutz-based timing management method according to claim 7, wherein the dispatch factory is configured with a SimpleTrigger trigger and a CronTrigger trigger;
if the scheduling type of the task is periodically executed and the time interval is minutes, executing the task at fixed time through a SimpleTrigger trigger;
if the scheduling type of the task is periodically executed and the time interval is the interval time beyond the minute, the task is executed regularly through a CronTrigger trigger;
and if the scheduling type of the task is self-defined execution and the execution time is started to be greater than the current time, executing the task at fixed time through a CronTrigger trigger.
9. The timing management system based on quartz is characterized in that the task is managed and the timing is regulated by the timing management method based on quartz according to any one of claims 1-8, and the system comprises:
the management module is used for configuring basic information of the tasks and generating configuration information, the basic information comprises but is not limited to a task code number, a task name, an execution job, a task state and a scheduling setting mode, the task state comprises enabling and disabling, and the enabling is to execute the tasks at regular time according to the scheduling setting;
the judgment management module is used for reading the basic information of the task and judging the task state of the task;
the scheduling factory is a task scheduler based on a quartz frame and is used for allocating a scheduler instance to a task of which the task state is enabled, instantiating the scheduler instance to form a scheduling object according to a corresponding scheduling setting mode, enabling a scheduling thread to execute the task, and returning the scheduling execution state and the execution result of the task;
the immediate execution module is used for calling the judgment management module to judge the task state of the task, executing the task through an independent thread if the task state is enabled, returning the scheduling execution state and the execution result of the task, and forbidding the task to be executed if the task state is disabled;
the database is used for storing the basic information of the tasks, the execution condition of the tasks and the scheduling execution state and execution result of the tasks, and generating a log of the tasks based on the basic information of the tasks, the execution condition of the tasks and the scheduling execution state and execution result of the tasks;
the management module is provided with a timing management interface which is used for checking and displaying the basic information of the task, the scheduling execution state and execution result of the task and the log of the task, and downloading the log of the task.
10. The quartz-based timing management system of claim 9, wherein the dispatch factory is configured with a SimpleTrigger trigger and a CronTrigger trigger;
if the scheduling type of the task is periodically executed and the time interval is minutes, executing the task at fixed time through a SimpleTrigger trigger;
if the scheduling type of the task is periodically executed and the time interval is the interval time beyond the minute, the task is executed regularly through a CronTrigger trigger;
and if the scheduling type of the task is self-defined execution, executing the task at regular time through a CronTrigger trigger.
CN201910915180.9A 2019-09-26 2019-09-26 Timing management method and system based on quartz Pending CN110688212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910915180.9A CN110688212A (en) 2019-09-26 2019-09-26 Timing management method and system based on quartz

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910915180.9A CN110688212A (en) 2019-09-26 2019-09-26 Timing management method and system based on quartz

Publications (1)

Publication Number Publication Date
CN110688212A true CN110688212A (en) 2020-01-14

Family

ID=69110213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910915180.9A Pending CN110688212A (en) 2019-09-26 2019-09-26 Timing management method and system based on quartz

Country Status (1)

Country Link
CN (1) CN110688212A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586043A (en) * 2020-05-07 2020-08-25 广东培正学院 Operation and maintenance management system for computer equipment
CN111966474A (en) * 2020-08-11 2020-11-20 武汉遂意语联网络科技有限公司 Method and device for controlling timing task
CN112445598A (en) * 2020-12-07 2021-03-05 建信金融科技有限责任公司 Task scheduling method and device based on quartz, electronic equipment and medium
CN115146982A (en) * 2022-07-15 2022-10-04 浙江欧菲克斯交通科技有限公司 Intelligent scheduling control system, method and interface for mobile variable traffic information board

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090089785A1 (en) * 2007-09-27 2009-04-02 Dirk Marwinski System and method for job scheduling in application servers
CN101887381A (en) * 2010-06-22 2010-11-17 北京伟库电子商务科技有限公司 Method and device for configuring timing tasks based on Quartz frame
CN104536819A (en) * 2014-12-29 2015-04-22 同程网络科技股份有限公司 Task scheduling method based on WEB service
CN105094961A (en) * 2015-08-11 2015-11-25 北京思特奇信息技术股份有限公司 Task scheduling management system based on quartz frame and method thereof
CN105824695A (en) * 2016-03-18 2016-08-03 浪潮软件集团有限公司 Timed task scheduling plug-in Quartz use
CN108762900A (en) * 2018-05-21 2018-11-06 平安科技(深圳)有限公司 High frequency method for scheduling task, system, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090089785A1 (en) * 2007-09-27 2009-04-02 Dirk Marwinski System and method for job scheduling in application servers
CN101887381A (en) * 2010-06-22 2010-11-17 北京伟库电子商务科技有限公司 Method and device for configuring timing tasks based on Quartz frame
CN104536819A (en) * 2014-12-29 2015-04-22 同程网络科技股份有限公司 Task scheduling method based on WEB service
CN105094961A (en) * 2015-08-11 2015-11-25 北京思特奇信息技术股份有限公司 Task scheduling management system based on quartz frame and method thereof
CN105824695A (en) * 2016-03-18 2016-08-03 浪潮软件集团有限公司 Timed task scheduling plug-in Quartz use
CN108762900A (en) * 2018-05-21 2018-11-06 平安科技(深圳)有限公司 High frequency method for scheduling task, system, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HARIS VOLOS: "Quartz: A Lightweight Performance Emulator for Persistent Memory Software", 《MIDDLEWARE "15: PROCEEDINGS OF THE 16TH ANNUAL MIDDLEWARE CONFERENCE》 *
叶刚: "基于Quartz的可视化定时任务管理方案", 《电子技术与软件工程》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586043A (en) * 2020-05-07 2020-08-25 广东培正学院 Operation and maintenance management system for computer equipment
CN111586043B (en) * 2020-05-07 2022-08-19 广东培正学院 Operation and maintenance management system for computer equipment
CN111966474A (en) * 2020-08-11 2020-11-20 武汉遂意语联网络科技有限公司 Method and device for controlling timing task
CN111966474B (en) * 2020-08-11 2024-04-02 武汉遂意语联网络科技有限公司 Method and device for controlling timing task
CN112445598A (en) * 2020-12-07 2021-03-05 建信金融科技有限责任公司 Task scheduling method and device based on quartz, electronic equipment and medium
CN115146982A (en) * 2022-07-15 2022-10-04 浙江欧菲克斯交通科技有限公司 Intelligent scheduling control system, method and interface for mobile variable traffic information board

Similar Documents

Publication Publication Date Title
CN110688212A (en) Timing management method and system based on quartz
US10062043B2 (en) System and method for dynamically coordinating tasks, schedule planning, and workload management
US11294711B2 (en) Wait a duration timer action and flow engine for building automated flows within a cloud based development platform
CN106775699B (en) Method and system for updating UI in asynchronous thread
US8181181B2 (en) Task-optimizing calendar system
CN103197960B (en) Dispatching method and system for batch job system
CN101887381A (en) Method and device for configuring timing tasks based on Quartz frame
WO2005101187A2 (en) Grouping and displaying multiple tasks within an event object of an electronic calendar
CN111143043B (en) Scheduled task processing method, device, equipment and medium based on Quartz service
US20210117907A1 (en) Scrum program board systems and methods
US20150148023A1 (en) System and Method for Managing an Alarm Clock
CN105955811A (en) System and method for achieving task scheduling based on remote invoking mode
CN113742044A (en) Timed task management method, device, equipment and storage medium
US10725872B2 (en) Restore points based on milestone versions
US10489196B1 (en) Job scheduler for remote maintenance of servers and workstations
KR101109292B1 (en) Active agenda
CN115525406A (en) Distributed asynchronous task scheduling system
US20210042707A1 (en) On-call scheduling and enhanced contact preference management
CN112015528B (en) Industrial control system software control flow construction and analysis method
US20210365275A1 (en) Automated task management techniques
CN111104095A (en) Method for realizing Quartz multitask management control
CN115658267A (en) Dynamic job adjustment method and device, electronic device and storage medium
EP3462309A1 (en) Method for generating user interfaces from a manufacturing application model
WO2024037132A1 (en) Workflow processing method and apparatus, and device, storage medium and program product
US20210390516A1 (en) Task scheduler for scheduling recurring tasks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination