CN109800080A - A kind of method for scheduling task based on Quartz frame, system and terminal device - Google Patents

A kind of method for scheduling task based on Quartz frame, system and terminal device Download PDF

Info

Publication number
CN109800080A
CN109800080A CN201811529432.6A CN201811529432A CN109800080A CN 109800080 A CN109800080 A CN 109800080A CN 201811529432 A CN201811529432 A CN 201811529432A CN 109800080 A CN109800080 A CN 109800080A
Authority
CN
China
Prior art keywords
task
cluster name
management table
dispatcher
name variable
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
CN201811529432.6A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811529432.6A priority Critical patent/CN109800080A/en
Publication of CN109800080A publication Critical patent/CN109800080A/en
Pending legal-status Critical Current

Links

Abstract

The present invention is suitable for field of computer technology, provide a kind of method for scheduling task based on Quartz frame, system and terminal device, it include: the configuration file for obtaining server, the corresponding cluster name variable of server is determined according to the configuration file of server, and the attribute of the task dispatcher of Quartz frame is configured according to cluster name variable;Task management table is created, by cluster name variable import task management table;Task schedule is carried out according to task management table by task dispatcher, and task schedule result is saved in the database.Cluster name variable is obtained according to the configuration file of server, according to the attribute and task management table of cluster name variable collocation task scheduling device, task dispatcher based on same database is scheduled and manages to the task of different group systems, the unified management to multi-cluster system is realized, efficiently solves the problems, such as that scheduling can not be managed to the task of multiple group systems on the basis of same database based on the realization of Quartz frame at present.

Description

A kind of method for scheduling task based on Quartz frame, system and terminal device
Technical field
The invention belongs to field of computer technology more particularly to a kind of method for scheduling task based on Quartz frame, it is System and terminal device.
Background technique
Quartz frame is the open source job scheduling frame write completely by java.Timing is widely used in appoint The task management and scheduling of business, however Quartz frame is mainly used for realizing the task of single cluster task of same database at present Management and scheduling, and cannot achieve and task management and scheduling are carried out based on task of the same database to multiple group systems.
In conclusion realizing on the basis of same database presently, there are Quartz frame can not be based on to multiple clusters The problem of task of system is managed scheduling.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of method for scheduling task based on Quartz frame, system and ends End equipment, to solve the problems, such as that more account managements have the risk for forgeing account number cipher at present and register is cumbersome.
The first aspect of the present invention provides a kind of method for scheduling task based on Quartz frame, comprising:
The configuration file for obtaining server, determines the corresponding cluster of the server according to the configuration file of the server Name variable configures the attribute of the task dispatcher of Quartz frame according to the cluster name variable;The cluster name becomes Amount is for distinguishing each group system;
Task management table is created, by task management table described in the cluster name variable import;
Task schedule is carried out according to the task management table by the task dispatcher, and task schedule result is saved In the database.
The second aspect of the present invention provides a kind of task scheduling system based on Quartz frame, comprising:
Configuration module determines the clothes according to the configuration file of the server for obtaining the configuration file of server The corresponding cluster name variable of business device, the attribute of the task dispatcher of Quartz frame is configured according to the cluster name variable; The cluster name variable is for distinguishing each group system;
Import modul, for creating task management table, by task management table described in the cluster name variable import;
Scheduler module for carrying out task schedule according to the task management table by the task dispatcher, and will appoint Scheduling result of being engaged in saves in the database.
The third aspect of the present invention provides a kind of terminal device, including memory, processor and is stored in described deposit In reservoir and the computer program that can run on the processor, the processor realized when executing the computer program with Lower step:
The configuration file for obtaining server, determines the corresponding cluster of the server according to the configuration file of the server Name variable configures the attribute of the task dispatcher of Quartz frame according to the cluster name variable;The cluster name becomes Amount is for distinguishing each group system;
Task management table is created, by task management table described in the cluster name variable import;
Task schedule is carried out according to the task management table by the task dispatcher, and task schedule result is saved In the database.
The fourth aspect of the present invention provides a kind of computer readable storage medium, and the computer readable storage medium is deposited Computer program is contained, the computer program performs the steps of when being executed by processor
The configuration file for obtaining server, determines the corresponding cluster of the server according to the configuration file of the server Name variable configures the attribute of the task dispatcher of Quartz frame according to the cluster name variable;The cluster name becomes Amount is for distinguishing each group system;
Task management table is created, by task management table described in the cluster name variable import;
Task schedule is carried out according to the task management table by the task dispatcher, and task schedule result is saved In the database.
A kind of method for scheduling task based on Quartz frame, system and terminal device provided by the invention, pass through basis The configuration file of server obtains cluster name variable, and according to the attribute and task of cluster name variable collocation task scheduling device Table is managed, the task dispatcher based on a database is according to having imported the task management table of cluster name variable come to different collection The task of group's system is scheduled and manages, and is managed collectively with realizing the task to multi-cluster system, efficiently solves mesh It is preceding to exist and the task of multiple group systems is managed on the basis of same database based on the realization of Quartz frame The problem of scheduling.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is that a kind of implementation process for method for scheduling task based on Quartz frame that the embodiment of the present invention one provides is shown It is intended to;
Fig. 2 is the implementation process schematic diagram of one step S101 of corresponding embodiment provided by Embodiment 2 of the present invention;
Fig. 3 is the implementation process schematic diagram for the one step S103 of corresponding embodiment that the embodiment of the present invention three provides;
Fig. 4 is a kind of structural representation for task scheduling system based on Quartz frame that the embodiment of the present invention four provides Figure;
Fig. 5 is the structural schematic diagram of configuration module 101 in the corresponding embodiment four of the offer of the embodiment of the present invention five;
Fig. 6 is the structural schematic diagram of scheduler module 103 in the corresponding embodiment four of the offer of the embodiment of the present invention six;
Fig. 7 is the schematic diagram for the terminal device that the embodiment of the present invention seven provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, system, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
Presently, there are can not be realized based on Quartz frame on the basis of same database in order to solve for the embodiment of the present invention On the problem of scheduling is managed to the task of multiple group systems, it is provided in an embodiment of the present invention a kind of to be based on Quartz frame Method for scheduling task, system and terminal device, by according to the configuration file of server obtain cluster name variable, and according to The attribute and task management table of cluster name variable collocation task scheduling device, the task dispatcher based on a database is according to leading The task management table of cluster name variable is entered the task of different group systems is scheduled and be managed, has realized to more collection Group system task be managed collectively, efficiently solve presently, there are can not be based on Quartz frame realize in same database On the basis of the problem of scheduling is managed to the task of multiple group systems.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Embodiment one:
As shown in Figure 1, present embodiments providing a kind of method for scheduling task based on Quartz frame, specifically include:
Step S101: obtaining the configuration file of server, determines the server according to the configuration file of the server Corresponding cluster name variable configures the attribute of the task dispatcher of Quartz frame according to the cluster name variable;It is described Cluster name variable is for distinguishing each group system.
It should be noted that Quartz frame includes task (JOB), task trigger (Trigger) and task schedule Device (Scheduler).Task (JOB) is the object that Quartz frame is scheduled and manages, task (JOB) provide one it is right The interface of pragmatic existing class is taken over, task realizes that class is the specific coding of task execution, and Quaqrtz frame is executing task (JOB) When, it will create a task instances (JobDeatail), task of the task (JOB) is described by (JobDeatail) is realized Class static information relevant with other, such as task names, association monitor, task description.Task trigger (Trigger) is used In triggering task (JOB).Task dispatcher (Scheduler) is an autonomous container of Quartz frame, by the way that task is real Example (JobDeatail) and task trigger (Trigger) are injected into task dispatcher (Scheduler), to realize to task (JOB) scheduling.
In a particular application, deployment unit belonging to different group systems is different, when disposing group system, cluster system The configuration item of system can be configured according to corresponding by deployment unit, therefore when configuring to configuration file, different collection Cluster name variable in the configuration file of group's system is also different.It should be noted that a cluster includes multiple services Device.
In a particular application, by obtaining the configuration file of server, and then the corresponding cluster name of the server is determined Variable.Specifically, entered the operating system of the server by the IP address of server, then service is inquired by operating system The configuration file of device determines cluster name variable by cluster information belonging to server in configuration file.
In a particular application, Quartz frame judges whether multiple servers belong to the same collection according to cluster name variable Group's system, if the cluster name variable of two servers is identical, the two servers belong to the same group system, if two The cluster name variable of server is different, then the two servers are not belonging to the same group system.
It in a particular application, is the category that task dispatcher is set by Quartz frame when carrying out Portable Batch System Property realizes task schedule.It is realized by setting cluster name variable to the Instance Name of task dispatcher to different cluster systems The scheduling of the task of system.
Step S102: creation task management table, by task management table described in the cluster name variable import.
It should be understood that task management table is for the ease of being managed to Quartz frame to each task (JOB) And create, the task management table includes cluster name field, task encoding field, executes mode field, task realization class Field, time started field and end time field.
In a particular application, the cluster name variable import is specifically become cluster name into task management table Amount is directed into cluster name field, and passes through cluster name in the task of crawl using cluster name field as identification field Field grabs corresponding task into respective cluster system to execute.
Step S103: task schedule is carried out according to the task management table by the task dispatcher, and by task tune Result is spent to save in the database.
In a particular application, task dispatcher executes task according to task management table, according to the cluster of task management table Name field grabs the task of different group systems.
In a particular application, task based access control management table issues task execution in Quartz frame by task dispatcher and refers to It enables, grabs the mission script file of corresponding group system, execute the mission script file, execute and returned after completing to task dispatcher Receipt row is as a result, and in the database by implementing result storage.
In a particular application, it is realized according to cluster name field, task encoding field and the task in task management table Class field determines the position of the perform script file of task, according to task management table at the beginning of field, end time field And the timing of mode field setting task execution is executed, realize the scheduling to Quartz frame.
Method for scheduling task provided in this embodiment based on Quartz frame, by being obtained according to the configuration file of server Cluster name variable is taken, and according to the attribute and task management table of cluster name variable collocation task scheduling device, is based on a number It is carried out according to the task dispatcher in library according to the task management table for having imported cluster name variable come the task to different group systems Scheduling and management, are managed collectively, efficiently solve that presently, there are can not be based on realizing the task to multi-cluster system The problem of realization of Quartz frame is managed scheduling to the task of multiple group systems on the basis of same database.
Embodiment two:
As shown in Fig. 2, in the present embodiment, the step S101 in embodiment one is specifically included:
Step S201: task dispatcher is created by the interface of the Quartz frame.
Step S202: the entitled cluster name variable of example of the task dispatcher is set.
In a particular application, task dispatcher is created by the StdSchedulerFactory interface of Quartz frame (Scheduler).And by the quartz.properties attribute configuration file of scheduler come the category of collocation task scheduling device Property, above-mentioned quartz.properties attribute configuration file is used for collocation task scheduling device attribute, thread pool attribute and operation Store attribute.
In a particular application, by quartz.properties attribute configuration file by the Instance Name (o of task dispatcher Rg.quartz.scheduler.instanceName) it is set as above-mentioned cluster name variable.
Embodiment three:
As shown in figure 3, in the present embodiment, the step S104 in embodiment one is specifically included:
Step S301: task-performance instructions are issued according to the task management table by the task dispatcher.
In a particular application, according to the execution mode field of task each in task management table, time started field and End time field is that the distribution of each task executes the time, and above-mentioned execution mode field is used to identify the execution state of the task, Execution state includes in being not carried out, executing and having executed.Above-mentioned time started field and end time field are appointed for identifying The time point for starting to execute of business and the time point for terminating execution.Task dispatcher is according to the execution time of task, task encoding And task realizes that class generates and issues task-performance instructions.
In a particular application, above-mentioned task execution time is also conceivable to the priority of task, refers to issuing task execution When enabling, preferentially issues the high task of priority and correspond to task-performance instructions.
Step S302: script task is grabbed according to the task-performance instructions.
In a particular application, according to the task encoding and task realization class positioning script task in task-performance instructions, and Grab the script task.Specifically, determining the specific location of the corresponding mission script file of the script task, and grab the task Script file.
In a particular application, according to the Instance Name (org.qu of task dispatcher in the attribute configuration file of Quartz frame Artz.scheduler.instanceName the task of corresponding cluster name field in task management table) is grabbed.And then it determines The specific location of the corresponding mission script file of the script task, and grab the mission script file.
Step S303: the script task is executed, and to the task dispatcher after script task execution completion Return to implementing result.
In a particular application, the mode of perform script task includes remotely executing and locally executing.When to script task into When row remotely executes, implementing result is remotely operated and obtained by Tlenet/ssh/ftp order.When to script task into When row executes, Quartz frame directly obtains implementing result according to the executive condition of script task.Above-mentioned implementing result includes holding Go successfully and execute exception.
Step S304: the implementing result is saved in the database.
In a particular application, task dispatcher stores the implementing result received, and carries out Macro or mass analysis, will The structure of Macro or mass analysis saves in the database for administrator's real-time query.Specifically, it can also be generated according to implementing result The execution journal of mission script, so that administrator is managed.
In one embodiment, further comprising the steps of after step S304:
Step S305: obtaining implementing result is to execute the task encoding of abnormal script task.
Step S306: warning list is generated according to the task encoding;
Step S307: the warning list is pushed into administrator.
In a particular application, obtaining implementing result according to task management table is to execute the task volume of abnormal script task Code, and task based access control coding generates warning list, then alerting the task encoding in list is to execute appointing for abnormal script task Business coding, and in the database by the warning list of generation storage, so as to administrator's inquiry.
In a particular application, in order to remind administrator to execute abnormal situation, the warning list of generation is pushed into management Member.Specifically, the time is pushed by setting, sends alert notice to administrator when pushing the time.The side of above-mentioned alert notice Formula, which including but not limited to passes through, sends short massage notice administrator, by sending mail notification administrator, prompting to manage by pop-up Reason person.
Example IV:
As shown in figure 4, the present embodiment provides a kind of task scheduling systems 100 based on Quartz frame, for executing reality Apply the method and step in example one comprising configuration module 101, import modul 102 and scheduler module 103.
Configuration module 101 is used to obtain the configuration file of server, according to the determination of the configuration file of the server The corresponding cluster name variable of server configures the category of the task dispatcher of Quartz frame according to the cluster name variable Property;The cluster name variable is for distinguishing each group system.
Import modul 102 is for creating task management table, by task management table described in the cluster name variable import.
Scheduler module 103 is used to carry out task schedule according to the task management table by the task dispatcher, and will Task schedule result saves in the database.
It should be noted that the task scheduling system provided in an embodiment of the present invention based on Quartz frame, due to this Embodiment of the method shown in invention figure 1 is based on same design, bring technical effect and embodiment of the method phase shown in Fig. 1 of the present invention Together, particular content can be found in the narration in embodiment of the method shown in Fig. 1 of the present invention, and details are not described herein again.
Therefore, a kind of task scheduling system based on Quartz frame provided in this embodiment, can equally pass through basis The configuration file of server obtains cluster name variable, and according to the attribute and task of cluster name variable collocation task scheduling device Table is managed, the task dispatcher based on a database is according to having imported the task management table of cluster name variable come to different collection The task of group's system is scheduled and manages, and is managed collectively with realizing the task to multi-cluster system, efficiently solves mesh It is preceding to exist and the task of multiple group systems is managed on the basis of same database based on the realization of Quartz frame The problem of scheduling.
Embodiment five:
As shown in figure 5, in the present embodiment, the configuration module 101 in example IV includes for executing corresponding to Fig. 2 The structure of method and step in embodiment comprising scheduler creating unit 201 and instance name setting unit 202.
Scheduler creating unit 201 is used to create task dispatcher by the interface of the Quartz frame.
Instance Name setting unit 202 is used to be arranged the entitled cluster name variable of example of the task dispatcher.
Embodiment six:
As shown in fig. 6, in the present embodiment, the scheduler module 103 in example IV includes for executing corresponding to Fig. 3 The structure of method and step in embodiment comprising instruction issuance unit 301, task picking unit 302, execution unit 303 with And storage unit 304.
Instruction issuance unit 301 refers to for issuing task execution according to the task management table by the task dispatcher It enables;
Task picking unit 302 is used to grab script task according to the task-performance instructions;
Execution unit 303 is used to execute the script task, and to the task after script task execution completion Scheduler returns to implementing result;
Storage unit 304 is used to save the implementing result in the database.
In one embodiment, above-mentioned scheduler module 103 further includes abnormal acquiring unit, list generation unit and push Unit.
It is to execute the task encoding of abnormal script task that above-mentioned exception acquiring unit, which is used to obtain implementing result,.
Above-mentioned list generation unit is used to generate warning list according to the task encoding.
Above-mentioned push unit is used to the warning list pushing to administrator.
Embodiment seven:
Fig. 7 is the schematic diagram for the terminal device that the embodiment of the present invention seven provides.As shown in fig. 7, the terminal of the embodiment is set Standby 7 include: processor 70, memory 71 and are stored in the meter that can be run in the memory 71 and on the processor 70 Calculation machine program 72, such as program.The processor 70 realizes above-mentioned each embodiment of the method when executing the computer program 72 In step, such as step S101 to S103 shown in FIG. 1.Alternatively, when the processor 70 executes the computer program 72 Realize the function of each module/unit in the above system embodiment, such as the function of module 101 to 103 shown in Fig. 4.
Illustratively, the computer program 72 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 71, and are executed by the processor 70, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 72 in the terminal device 7 is described.For example, the computer program 72 can be divided It is cut into configuration module, import modul and scheduler module, each module concrete function is as follows:
Configuration module determines the clothes according to the configuration file of the server for obtaining the configuration file of server The corresponding cluster name variable of business device, the attribute of the task dispatcher of Quartz frame is configured according to the cluster name variable; The cluster name variable is for distinguishing each cluster;
Import modul, for creating task management table, by task management table described in the cluster name variable import;
Scheduler module for carrying out task schedule according to the task management table by the task dispatcher, and will appoint Scheduling result of being engaged in saves in the database.
The terminal device 7 can be the calculating such as desktop PC, notebook, palm PC and cloud management server Equipment.The terminal device may include, but be not limited only to, processor 70, memory 71.It will be understood by those skilled in the art that Fig. 7 is only the example of terminal device 7, does not constitute the restriction to terminal device 7, may include more more or fewer than illustrating Component, perhaps combines certain components or different components, for example, the terminal device can also include input-output equipment, Network access equipment, bus etc..
Alleged processor 70 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 71 can be the internal storage unit of the terminal device 7, such as the hard disk or interior of terminal device 7 It deposits.The memory 71 is also possible to the External memory equipment of the terminal device 7, such as be equipped on the terminal device 7 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 71 can also both include the storage inside list of the terminal device 7 Member also includes External memory equipment.The memory 71 is for storing needed for the computer program and the terminal device Other programs and data.The memory 71 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of the system is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.It is above-mentioned wireless The specific work process of unit in terminal, module, can refer to corresponding processes in the foregoing method embodiment, no longer superfluous herein It states.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed system/terminal device and method, it can be with It realizes by another way.For example, system described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, system Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit for being set as separate part description may or may not be physically separated, and be set as single The component of member display may or may not be physical unit, it can and it is in one place, or may be distributed over In multiple network units.Some or all of unit therein can be selected to realize this embodiment scheme according to the actual needs Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit, which is realized in the form of SFU software functional unit and is arranged, is independent product sale Or it in use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned reality The all or part of the process in a method is applied, relevant hardware can also be instructed to complete by computer program, it is described Computer program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that The step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, the computer program Code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie Matter may include: can carry the computer program code any entity or system, recording medium, USB flash disk, mobile hard disk, Magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and Telecommunication signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of method for scheduling task based on Quartz frame characterized by comprising
The configuration file for obtaining server, determines the corresponding cluster name of the server according to the configuration file of the server Variable configures the attribute of the task dispatcher of Quartz frame according to the cluster name variable;The cluster name variable is used In each group system of differentiation;
Task management table is created, by task management table described in the cluster name variable import;
Task schedule is carried out according to the task management table by the task dispatcher, and task schedule result is stored in number According in library.
2. the method according to claim 1, wherein described configure Quartz frame according to the cluster name variable The attribute of the task dispatcher of frame, comprising:
Task dispatcher is created by the interface of the Quartz frame;
The entitled cluster name variable of example of the task dispatcher is set.
3. according to the method described in claim 1, it is characterized in that the task management table includes cluster name field, task volume Code field executes mode field, task realization class field, time started field and end time field;
It is described by task management table described in the cluster name variable import specifically: by the cluster name variable import to institute State cluster name field.
4. the method according to claim 1, wherein described pass through the scheduler based on the task management table Carry out task schedule, comprising:
Task-performance instructions are issued according to the task management table by the task dispatcher;
Script task is grabbed according to the task-performance instructions;
The script task is executed, and returns to implementing result to the task dispatcher after script task execution completion;
The implementing result is saved in the database.
5. according to the method described in claim 4, it is characterized in that, to the task tune after script task execution completion It spends after device return implementing result, further includes:
Obtaining implementing result is to execute the task encoding of abnormal script task;
Warning list is generated according to the task encoding;
The warning list is pushed into administrator.
6. a kind of task scheduling system based on Quartz frame characterized by comprising
Configuration module determines the server according to the configuration file of the server for obtaining the configuration file of server Corresponding cluster name variable configures the attribute of the task dispatcher of Quartz frame according to the cluster name variable;It is described Cluster name variable is for distinguishing each group system;
Import modul, for creating task management table, by task management table described in the cluster name variable import;
Scheduler module, for by the task dispatcher according to task management table progress task schedule, and by task tune Result is spent to save in the database.
7. task scheduling system according to claim 6, which is characterized in that the configuration module includes:
Scheduler creating unit, for creating task dispatcher by the interface of the Quartz frame;
Instance Name setting unit, the entitled cluster name variable of example for the task dispatcher to be arranged.
8. task scheduling system according to claim 6, which is characterized in that the scheduler module includes:
Issuance unit is instructed, for issuing task-performance instructions according to the task management table by the task dispatcher;
Task picking unit, for grabbing script task according to the task-performance instructions;
Execution unit, for executing the script task, and to the task dispatcher after script task execution completion Return to implementing result;
Storage unit, for saving in the database the implementing result.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 5 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201811529432.6A 2018-12-14 2018-12-14 A kind of method for scheduling task based on Quartz frame, system and terminal device Pending CN109800080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811529432.6A CN109800080A (en) 2018-12-14 2018-12-14 A kind of method for scheduling task based on Quartz frame, system and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811529432.6A CN109800080A (en) 2018-12-14 2018-12-14 A kind of method for scheduling task based on Quartz frame, system and terminal device

Publications (1)

Publication Number Publication Date
CN109800080A true CN109800080A (en) 2019-05-24

Family

ID=66556720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811529432.6A Pending CN109800080A (en) 2018-12-14 2018-12-14 A kind of method for scheduling task based on Quartz frame, system and terminal device

Country Status (1)

Country Link
CN (1) CN109800080A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110187936A (en) * 2019-05-31 2019-08-30 口碑(上海)信息技术有限公司 Data backflow platform, system and method
CN110764881A (en) * 2019-10-23 2020-02-07 中国工商银行股份有限公司 Distributed system background retry method and device
CN112445598A (en) * 2020-12-07 2021-03-05 建信金融科技有限责任公司 Task scheduling method and device based on quartz, electronic equipment and medium
WO2021051531A1 (en) * 2019-09-19 2021-03-25 平安科技(深圳)有限公司 Method and apparatus for processing multi-cluster job record, and device and storage medium
CN112714022A (en) * 2020-12-29 2021-04-27 平安普惠企业管理有限公司 Control processing method and device for multiple clusters and computer equipment
CN112748990A (en) * 2019-10-30 2021-05-04 北京国双科技有限公司 Quartz-based data quality task execution method and device and computer equipment
CN113722057A (en) * 2021-03-12 2021-11-30 京东数字科技控股股份有限公司 Big data cluster processing method and system, electronic device and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110187936A (en) * 2019-05-31 2019-08-30 口碑(上海)信息技术有限公司 Data backflow platform, system and method
WO2021051531A1 (en) * 2019-09-19 2021-03-25 平安科技(深圳)有限公司 Method and apparatus for processing multi-cluster job record, and device and storage medium
CN110764881A (en) * 2019-10-23 2020-02-07 中国工商银行股份有限公司 Distributed system background retry method and device
CN112748990A (en) * 2019-10-30 2021-05-04 北京国双科技有限公司 Quartz-based data quality task execution method and device and computer equipment
CN112445598A (en) * 2020-12-07 2021-03-05 建信金融科技有限责任公司 Task scheduling method and device based on quartz, electronic equipment and medium
CN112714022A (en) * 2020-12-29 2021-04-27 平安普惠企业管理有限公司 Control processing method and device for multiple clusters and computer equipment
CN113722057A (en) * 2021-03-12 2021-11-30 京东数字科技控股股份有限公司 Big data cluster processing method and system, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN109800080A (en) A kind of method for scheduling task based on Quartz frame, system and terminal device
CN107943580A (en) For managing the method and equipment of user's intelligence contract at block chain link point
CN105474171A (en) Model-based approach to intelligent automation in a computing domain
CN109634728A (en) Job scheduling method, device, terminal device and readable storage medium storing program for executing
CN109214704A (en) A kind of distributed intelligence operation platform, method, apparatus and readable storage medium storing program for executing
CN110069334A (en) A kind of method and system based on the distributed data job scheduling for assuring reason
CN102447743A (en) System and method for cloud enterprise services
US8538793B2 (en) System and method for managing real-time batch workflows
CN110162388A (en) A kind of method for scheduling task, system and terminal device
US10200461B2 (en) Virtualized capacity management
CN104508625A (en) Abstraction models for monitoring of cloud resources
CN108183933A (en) Information push method, apparatus and system, electronic equipment and computer storage media
CN108701132A (en) Resource management system and method
CN110457371A (en) Data managing method, device, storage medium and system
CN110096521A (en) Log information processing method and device
CN107066339A (en) Distributed job manager and distributed job management method
CN103164774A (en) Automobile complete vehicle development system based on workflow
CN108111499A (en) Service process performance optimization method, device, electronic equipment and storage medium
CN109840141A (en) Thread control method, device, electronic equipment and storage medium based on cloud monitoring
US8392566B1 (en) Computer executable services
Margheri et al. Linguistic abstractions for programming and policing autonomic computing systems
CN113656209A (en) Resource processing method, device, equipment and storage medium
CN1783121B (en) Method and system for executing design automation
CN114787836A (en) System and method for remotely executing one or more arbitrarily defined workflows
CN107679691B (en) Working equipment management method and system

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