CN109254765B - Timing task management method, device, computer equipment and storage medium - Google Patents

Timing task management method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109254765B
CN109254765B CN201810959335.4A CN201810959335A CN109254765B CN 109254765 B CN109254765 B CN 109254765B CN 201810959335 A CN201810959335 A CN 201810959335A CN 109254765 B CN109254765 B CN 109254765B
Authority
CN
China
Prior art keywords
task
jar
timing task
timed
timing
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.)
Active
Application number
CN201810959335.4A
Other languages
Chinese (zh)
Other versions
CN109254765A (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810959335.4A priority Critical patent/CN109254765B/en
Publication of CN109254765A publication Critical patent/CN109254765A/en
Application granted granted Critical
Publication of CN109254765B publication Critical patent/CN109254765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • 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/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a timing task management method, a timing task management device, computer equipment and a storage medium, wherein the method comprises the following steps: scanning source codes of a server cluster connected with a timing task management server through a pre-deployed timing task detection tool to obtain a timing task code block; storing the timed task code blocks into corresponding timed task projects, and processing the timed task projects by adopting a compiling and packing tool to obtain timed task Jar packets; acquiring a target Jar package corresponding to the request identifier from a third party class library through a project dependency management tool, and acquiring the target Jar package from the third party class library through the project dependency management tool; storing the timing task Jar package and the target Jar package in a Lib folder, and monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink framework. The centralized and unified management of the timed task code blocks is realized, and the efficiency of acquiring the timed task code blocks is improved.

Description

Timing task management method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for managing a timing task, a computer device, and a storage medium.
Background
Basically, there is a need for timing task processing in different needs or projects, and as the traffic volume increases, the traffic volume of timing task processing in the system increases greatly, and the operations of adding, deleting and modifying code blocks for implementing the timing tasks are more and more frequent. Aiming at the current requirement that a code block for realizing a timing task needs to be newly added, deleted or modified in a service program, a common mode is repeated writing, manual deletion and modification of a developer. The code blocks for realizing the timing tasks can be added, deleted and modified for a specific business program, so that the repeated workload of a developer is increased, the time of the developer is wasted, and the development efficiency is low. At the same time, there is a lack of unified management of code blocks for implementing timing tasks.
Disclosure of Invention
The embodiment of the invention provides a timing task management method, a timing task management device, computer equipment and a storage medium, which are used for solving the problems that the development efficiency of a current timing task code block is low and unified management cannot be realized.
A timed task management method comprising the steps of, performed by a timed task management server:
Scanning source codes of a server cluster connected with the timing task management server through a pre-deployed timing task detection tool to obtain timing task code blocks;
storing the timed task code blocks into corresponding timed task projects, and compiling and packaging the timed task projects by adopting a compiling and packaging tool to obtain timed task Jar packages;
acquiring an operation request corresponding to the timing task Jar package, wherein the operation request comprises a request identifier, and acquiring a target Jar package corresponding to the request identifier from a third party class library through a project dependency management tool based on the request identifier;
storing the timing task Jar package and the target Jar package in a Lib folder, and monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink framework.
A timed task management device comprising:
the code block acquisition module is used for scanning source codes of a server cluster connected with the timing task management server through a pre-deployed timing task detection tool to acquire timing task code blocks;
the timed task Jar packet acquisition module is used for storing the timed task code blocks into corresponding timed task projects, and compiling and packaging the timed task projects by adopting a compiling and packaging tool to acquire timed task Jar packets;
The target Jar package acquisition module is used for acquiring an operation request corresponding to the timing task Jar package, wherein the operation request comprises a request identifier, and the target Jar package corresponding to the request identifier is acquired from a third party class library through a project dependency management tool based on the request identifier;
and the Jar package management module is used for storing the timing task Jar package and the target Jar package in a Lib folder, and monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink framework.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the timed task management method described above when the computer program is executed by the processor.
A computer readable storage medium storing a computer program which when executed by a processor implements the steps of the timed task management method described above.
According to the timing task management method, the timing task management device, the computer equipment and the storage medium, the timing task code blocks are acquired through the timing task detection tool, manual participation is not needed, and the efficiency of acquiring the timing task code blocks is improved. After the timed task code block is obtained, the timed task code block is stored in the corresponding timed task project, and the timed task project is processed by adopting a compiling and packing tool to obtain a timed task Jar packet. And then acquiring the target Jar package through a project dependency management tool to realize corresponding business logic. And finally, storing the timing task Jar package and the target Jar package in the Lib folder, and monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink frame, so that centralized and unified management of timing task code blocks is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a diagram of an application scenario of a timed task management method according to one embodiment of the present invention;
FIG. 2 is a flow chart of a method of timing task management in accordance with one embodiment of the present invention;
FIG. 3 is a flowchart showing step S11 in FIG. 2;
FIG. 4 is another flow diagram of a method of timed task management in one embodiment;
FIG. 5 is a flowchart showing step S102 in FIG. 4;
FIG. 6 is a flowchart showing step S40 in FIG. 2;
FIG. 7 is another specific flowchart of step S40 in FIG. 2;
FIG. 8 is a schematic diagram of a timing task management device according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a computer device in accordance with an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The timing task management method provided by the embodiment of the invention can be applied to an application environment as shown in fig. 1, and comprises a timing task monitoring end and a timing task management server which is in communication connection with the timing task monitoring end, wherein the timing task monitoring end is communicated with the timing task management server through a network. The timing task management server and the timing task monitoring terminal adopted in the embodiment are an SVN server and an SVN client respectively. The SVN is a version control system of an open source code, and is simply called Subversion. The timing task management server has 2 operation modes: independent servers and by means of an apache (a Web server). The embodiment adopts an operation mode of an independent server, and improves the data processing speed.
In one embodiment, as shown in fig. 2, a method for managing a timed task is provided, which is illustrated by taking the timed task management server in fig. 1 as an example, and includes the following steps executed by the timed task management server:
s10: and scanning source codes of a server cluster connected with the timing task management server through a pre-deployed timing task detection tool to acquire a timing task code block.
Wherein the timed task detection tool refers to a tool for detecting timed task code blocks. The please show character code blocks refer to code blocks written in the application program in the server cluster for implementing the timed task function. Specifically, the timed task server scans application programs in each server in the server cluster through a pre-deployed timed task detection tool, and acquires timed task code blocks from the application programs of each server in the server cluster. The timing task code blocks are acquired through the timing task detection tool, so that the source codes of the server cluster connected with the timing task management server are automatically scanned, manual participation is not needed, the timing task code blocks are automatically acquired, and the efficiency of acquiring the timing task code blocks is improved.
S20: and storing the timed task code blocks into corresponding timed task engineering, and compiling and packaging the timed task engineering by adopting a compiling and packaging tool to obtain a timed task Jar packet.
The timing task engineering refers to an engineering which is created in advance and used for storing the timing task code blocks. Only the acquired timed task code block is stored in the created timed task engineering, and the compiling and packing tool can be used for compiling and packing. If the timed task engineering is not created, the timed task code block cannot be directly compiled and packaged. Specifically, after the timed task management server acquires the timed task code block, a task engineering creation script in the timed task management server is triggered, and the task engineering creation script is operated to create a new timed task engineering. Wherein the task engineering creation script refers to a script stored in the timed task management server for creating a new engineering. When the timed task engineering is created, the timed task management server stores the timed task code block in the created timed task engineering. In this embodiment, for convenience in managing the timed task code blocks, one timed task engineering only allows one timed task module to be stored. After the timed task code block is stored in the timed task project, the timed task management server calls a compiling and packing tool to compile and pack the timed task project, so that the timed task project generates a timed task Jar packet. To facilitate the management of timed task Jar packages, each timed task Jar package has a corresponding package name. Due to the cross-platform property and the simple operation of Ant, ant is easy to integrate into some development environments, so that Ant is adopted to compile and package timed task engineering in the embodiment. Wherein Ant is a tool for automating the steps of compiling, testing, deploying, etc. of software, and is mostly used for software development in Java environment.
S30: the method comprises the steps of obtaining an operation request corresponding to a timing task Jar package, wherein the operation request comprises a request identifier, and obtaining a target Jar package corresponding to the request identifier from a third party class library through a project dependency management tool based on the request identifier.
The project dependency management tool is a tool for tracking and managing a third party class library. In this embodiment, the project dependency management tool may be Ivy, ivy, which is a tool for tracking and managing third party class libraries. Ivy has good flexibility and configurability, so that the system can adapt to various dependency management requirements and engineering construction process requirements. Specifically, after the timed task Jar package is obtained, the developer needs to perform corresponding processing operations on the timed task Jar package, where the processing operations performed on the timed task Jar package in this embodiment include adding, deleting and modifying. The developer inputs a processing operation in the project dependency management tool, and the timed task management server acquires a corresponding operation request, wherein the operation request comprises a request identification. The request identification refers to a specific character for identifying the operation process input by the developer. The request identifiers in this embodiment correspond to operation requests one by one, and one operation request corresponds to one request identifier. If the operation request is increased, the corresponding request mark is 1; when the operation request is deleted, the corresponding request mark is 2; when the operation request is modified, the corresponding request identifier is "0". After the SVN server obtains the request identifier corresponding to the operation request, a target Jar packet corresponding to the request identifier is selected from a third party class library. The third party class library comprises a large number of open source Jar packages which can realize different business logics, namely Jar packages for realizing dynamic loading functions, jar packages for unloading functions and Jar packages for calling functions among modules. In order to facilitate the timing task management server to search the corresponding target Jar package according to the request identifier, a developer may make a table associating the operation identifier with the Jar package based on the open source Jar package in the third party class library, and after the SVN obtains the request identifier, may search the table to find the corresponding target Jar package. The target Jar package in this embodiment refers to a Jar required by a developer. The Jar package is a package obtained by encapsulating a function compiled by Java language in advance, and corresponding business logic is realized by acquiring the target Jar package.
S40: storing the timing task Jar package and the target Jar package in a Lib folder, and monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink framework.
The JarsLink framework is a Java-based modularized development framework and is used for providing an interface for calling a target Jar package when the target Jar package is operated. In this embodiment, the garlink framework is used to monitor and manage the timing task Jar package and the target Jar package, and the execution logic of the timing task Jar package can be quickly and conveniently implemented by calling the interface of the target Jar package. Specifically, after the timing task management server obtains the timing task Jar package and the target Jar package, the timing task Jar package and the target Jar package are stored in a Lib folder, so that the Lib folder manages the timing task Jar package and the target Jar package. The Lib file refers to a static data connection library stored in the SVN and is used for uniformly managing the Jar package. It will be appreciated that Jar packages are only available for use if stored in the Lib folder. And then monitoring and managing the timing task Jar package through an interface of the target Jar package provided by the JarsLink framework.
Step S10-step S40, the timing task code blocks are acquired through the timing task detection tool, manual participation is not needed, and the efficiency of acquiring the timing task code blocks is improved. After the timed task code block is obtained, the timed task code block is stored in the corresponding timed task project, and the timed task project is processed by adopting a compiling and packing tool to obtain a timed task Jar packet. And then acquiring the target Jar package through a project dependency management tool to realize corresponding business logic. And finally, storing the timing task Jar package and the target Jar package in the Lib folder, and monitoring the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink framework to realize centralized and unified management of the timing task code blocks, so that the functions can be realized by using the timing task code blocks flexibly.
In one embodiment, as shown in fig. 3, in step S10, a timing task code block is acquired, which specifically includes the following steps:
s11: and acquiring a preconfigured timed task detection tool, wherein the timed task detection tool comprises a timed task identifier.
Specifically, the developer compiles the scanning path, the standard of the entrance and the target path on the timing task management server, and completes configuration and compiling of the timing task detection tool. The timing task detection tool is configured in the timing task management server through the scanning path pair, the inlet specification and the target path, so that the timing task detection tool is used for automatically scanning the timing task module, intelligent monitoring is realized, and monitoring efficiency is improved. The scanning path refers to a path of an application program of each server in the timing task detection tool scanning server cluster written on the timing task management server by a developer. The portal specification refers to portal standards written on the timed task management server by a developer for realizing information interaction between the timed task management server and each server in the server cluster. When the target path is designated, the task management server acquires the path of each server data in the server cluster.
In order to facilitate the timing task detection tool to detect the timing task code blocks in the server cluster, the timing task detection tool carries a timing task identifier. The timed task identity refers to a specific character used to identify the timed task code block, including but not limited to a module ID and a key.
S12: and performing recursion scanning on the application programs in the server cluster by adopting a timing task detection tool to acquire timing task code blocks matched with the timing task identifiers.
Wherein the timed task identity refers to an identity for identifying a timed task code block. The application programs of all servers in the server cluster exist in the form of folders, one application program comprises a plurality of functional modules, one functional module comprises a plurality of sub-functional modules, correspondingly, the folder in which one application program is located comprises a plurality of files respectively used for storing the functional modules, and one file comprises a plurality of sub-files respectively used for storing the sub-functional modules. Therefore, in this embodiment, the timing task detection tool adopts a recursive scanning mode to scan the program code corresponding to each layer of files in the folder layer by layer, so as to implement comprehensive automatic scanning on the application programs in the server cluster, and improve the acquisition efficiency of the timing task code blocks.
Specifically, the deployed timing task detection tool in the timing task management server performs recursive scanning on source codes of the server cluster according to the scanning path, the standard of the entrance and the target path in the task configuration request, so as to acquire timing task code blocks in the server cluster, perform comprehensive automatic scanning on the server cluster, and improve the acquisition efficiency of the timing task code blocks. In this embodiment, the timing task detection tool finds a corresponding server in the server cluster through the target path, then recursively describes the program codes in the server through a pre-configured scan path, if the timing task identifier exists in the application program, the timing task code block exists in the application program, and the server in the server cluster sends the timing task code block to the timing task management server through a pre-configured data transmission interface.
And step S11-step S12, the automatic acquisition of the timed task code blocks is realized by deploying the timed task detection tool, manual participation is not needed, and the efficiency of acquiring the timed task code blocks is improved. And recursively scanning an application program in the server cluster by using a timing task detection tool to acquire a timing task code block matched with the timing task identifier, wherein the timing task identifier is considered to correspond to the timing task code block only if the timing task identifier exists in the application program in the server cluster, so that the condition of omission when the timing task code block is searched manually can be avoided.
In one embodiment, as shown in fig. 4, after the step of acquiring the timed task code block in step S10, the timed task management method further includes the steps of:
s101: and acquiring a task attribute file corresponding to the timed task code block from a server cluster connected with the timed task management server, and storing the task attribute file in a database.
Specifically, each timed task code block has a corresponding task property file. The task attribute file designates a file formed by attribute parameters in the timed task code block and is used for managing the parameters of the timed task code block. The task attribute file comprises a timing task expression, a timing task name, a timing task version number, a timing task function description and the like corresponding to the timing task code block. Further, the timed task expression includes timed task parameters including, but not limited to, a timed task enable flag, a disable flag, an execution result, an execution state, and an execution cycle.
The timing task management server acquires the timing task code block from a server cluster connected with the timing task management server through a timing task detection tool, acquires a task attribute file corresponding to the timing task code block, and then stores the task attribute file in a database, so that the task parameters of the timing task code block can be conveniently modified through the task attribute file.
S102: based on the task property file, the timed task Jar package corresponding to the task property file is modified.
Generally, when some parameters in the timed task code block, such as the start time, the stop time, the execution period and the like, are adjusted, the timed task Jar packet is not directly modified, and is realized by modifying the timed task expression in the task attribute file corresponding to the timed task code block. In this embodiment, monitoring the timed task Jar packet refers to monitoring the running condition of the timed task Jar packet, including running time, running result and running state. The running time designates the running time of the task Jar package, such as when the task Jar starts to run, when the task Jar ends to run, how long the task Jar has been running, and the like. And the running result designates the running result of the task Jar package, such as test running, stop or abnormality in the running state of the task Jar package.
Step S101-step S102, by acquiring the task attribute file corresponding to the timed task code block and storing the task attribute file in the database, the timed task Jar package can be changed by changing the task attribute file stored in the database when the parameters in the timed task code block are modified later, and the flexibility of processing the timed task Jar package is improved.
In one embodiment, as shown in fig. 5, step S102, based on the task attribute file, modifies the timed task Jar package corresponding to the task attribute file, and specifically includes the following steps:
s1021: and acquiring a login request sent by the timing task monitoring end, wherein the login request comprises a login account and a login password.
The login request refers to a request for identity verification when a user logs in a timing task monitoring end. The login request in this embodiment includes a login account number and a login password. The login account refers to an account number of the user for logging in the timed task monitoring end, and the login password refers to a password of the user for logging in the timed task monitoring end. Specifically, after the user inputs the login account number and the login password at the timing task monitoring end, the user clicks a login button of the timing task monitoring end, and the timing task monitoring end sends a login request to the timing task management server. The timing task management server performs identity verification on a user entering the timing task monitoring end by acquiring a login request sent by the timing task monitoring end, so that the safety of data is ensured.
S1022: and verifying the login account and the login password, and if the verification is passed, acquiring a modification operation request sent by the timing task monitoring end, wherein the modification operation request comprises a file identifier.
Specifically, after the timed task management server acquires the login account and the login password sent by the timed task monitoring end, the login account and the login password are verified, and if the login account and the login password are matched with the login account and the login password stored in the timed task management server, the verification is passed, so that the safety of data is ensured. After the login account and the login password pass verification, a user can modify the timed task Jar package at the timed task monitoring end, and when the user needs to modify the timed task Jar package, the timed task monitoring end can send a modification operation request to a corresponding timed task management server. In order to facilitate the timing task management server to find the task attribute file to be modified, the modification operation request carries the file identifier. Wherein, the modification operation request refers to an operation request for modifying the timing task Jar packet. The file identifier refers to an identifier for identifying a task attribute file corresponding to the timed task Jar package.
S1023: and acquiring a target task attribute file corresponding to the file identification based on the file identification.
Specifically, after the timing task management server obtains the modification operation request sent by the timing task monitoring end, the task attribute file corresponding to the file identifier is queried in the database through the file identifier carried by the modification operation request, and the task attribute file is the target task attribute file. Wherein the target task attribute file refers to a task attribute file containing a file identification in the modification operation request.
S1024: and modifying the target task attribute file based on the modification operation request to complete modification operation of the timing task Jar package corresponding to the task attribute file.
The modification operation request in this embodiment specifically includes modifying parameters such as an enable time, a stop time, and an execution period of the timed task Jar packet. Because the user can not directly modify parameters of the timing task Jar package after packing when modifying parameters such as the starting time, the stopping time and the executing period corresponding to the timing task Jar package at the timing task monitoring end, the modification of the timing task Jar package can only be completed through modifying the task attribute file corresponding to the timing task Jar package. Specifically, a user modifies parameters such as start time, stop time and execution period corresponding to a timed task Jar packet at a timed task monitoring end, then clicks a modified operation button, and a timed task management server finds a target task attribute file corresponding to the timed task Jar packet and correspondingly modifies the parameters such as start time, stop time and execution period in the target task attribute file. Thus, the monitoring operation of the timing task Jar packet is completed.
In an embodiment, monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by using the korshink framework mainly includes calling the target Jar package to complete the adding or deleting operation of the timing task Jar package through an interface provided by the korshink framework. Before monitoring and managing the timed task Jar package, a user needs to input a login account and a login password at a timed task monitoring end, and after the login account and the login password input by the user are verified by a timed task management server, the monitoring and managing of the timed task Jar package can be achieved. As shown in fig. 6, step S40 stores a timing task Jar package and a target Jar package in a Lib folder, and monitors and manages the timing task Jar package and the target Jar package in the Lib folder by using a garlink framework, and specifically includes the following steps:
S411: and acquiring an adding operation request, wherein the adding operation request carries the packet name of the timing task Jar packet to be processed.
The timing task Jar package to be processed refers to a timing task Jar package which needs to be added or deleted according to service requirements by a user. In this embodiment, the user may further add one or more to-be-processed timed task Jar packets at the timed task monitoring end according to the service requirement, so as to implement the corresponding service requirement. Specifically, the user selects an added operation button at the timing task monitoring end, and the timing task monitoring end sends an added operation request to the corresponding timing task management server. The packet name of the timing task Jar packet to be processed is carried in the operation request, so that the timing task management server can find the corresponding timing task Jar packet to be processed according to the packet name of the timing task Jar packet to be processed.
S412: and acquiring the to-be-processed task Jar packet corresponding to the packet name of the timing task Jar packet through the packet name of the to-be-processed timing task Jar packet.
Specifically, the timing task management server obtains a to-be-processed task Jar packet corresponding to the packet name of the to-be-processed timing task Jar packet according to the packet name of the to-be-processed timing task Jar packet in the increasing operation request, and provides a data source for the subsequent increasing operation of the to-be-processed task Jar packet.
S413: and obtaining a dynamically loaded Jar package corresponding to the adding operation request from the target Jar package through the adding operation request, and completing the monitoring management operation of the Jar package of the task to be processed through the JarsLink framework.
Specifically, after the timing task management server obtains the adding operation request, it will obtain the Jar package of the dynamic loading function and the Jar package of the calling function between the modules from the target Jar package according to the adding operation request. After the Jar packet of the dynamic loading function and the Jar packet of the inter-module calling function are obtained, the corresponding task Jar packet to be processed is added to the timed task monitoring end through the interface provided by the JarsLink framework, so that the monitoring management operation of the task Jar packet to be processed is completed. The monitoring management operation of the Jar package of the task to be processed is completed by adding the operation request and the JarsLink framework, so that a user can realize the adding operation of the Jar package of the task to be processed by clicking an adding operation button on a timing task monitoring end, and the user can operate conveniently.
In one embodiment, as shown in fig. 7, step S40 stores a timing task Jar package and a target Jar package in a Lib folder, and uses a garlink framework to monitor and manage the timing task Jar package and the target Jar package in the Lib folder, and specifically includes the following steps:
S421: and acquiring a deleting operation request, wherein the deleting operation request carries the packet name of the timing task Jar packet to be processed.
Specifically, the user selects a delete operation button at the timed task monitoring end, and the timed task monitoring end sends a delete operation request to the corresponding timed task management server. The deleting operation request carries the packet name of the timing task Jar packet to be processed, so that the timing task management server can find the corresponding timing task Jar packet to be processed according to the packet name of the timing task Jar packet to be processed.
S422: and acquiring the to-be-processed task Jar packet corresponding to the packet name of the timing task Jar packet through the packet name of the to-be-processed timing task Jar packet.
Specifically, the timing task management server obtains a to-be-processed task Jar packet corresponding to the packet name of the to-be-processed timing task Jar packet according to the packet name of the to-be-processed timing task Jar packet in the deleting operation request, and provides a data source for deleting the subsequent to-be-processed task Jar packet.
S423: and acquiring the Jar package of the unloading function corresponding to the deleting operation request from the target Jar package through the deleting operation request, and completing the monitoring management operation of the Jar package of the task to be processed through the JarsLink framework.
Specifically, after the timing task management server obtains the deletion operation request, it obtains the Jar package of the unloading function and the Jar package of the inter-module calling function from the target Jar package according to the deletion operation request, deletes the corresponding task Jar package to be processed from the timing task monitoring end through the Jar package of the unloading function and the Jar package of the inter-module calling function provided by the korsrlink frame, and completes the monitoring management operation of the task Jar package to be processed. The monitoring management operation of the Jar package of the task to be processed is completed through the deleting operation request and the JarsLink framework, so that a user can delete the Jar package of the task to be processed only by clicking a deleting operation button on the timed task monitoring end, and the user can operate conveniently.
Step S411-step S423, by obtaining an add operation request or a delete operation request, the packet name of the to-be-processed timing task Jar packet to be added or deleted is obtained, then the corresponding to-be-processed task Jar packet is found in the timing task management server according to the packet name of the to-be-processed timing task Jar packet, then the Jar packet with the corresponding dynamic loading function or the Jar packet with the unloading function is selected from the target Jar packet according to the add or delete operation, and the add and delete operation of the to-be-processed task Jar packet is completed through the interface provided by the JarsLink framework, so that the add and delete operation of the to-be-processed timing task Jar packet is more convenient, and the flexible configuration of the timing task Jar packet is realized.
According to the timed task management method provided by the embodiment of the invention, the timed task code blocks are acquired through the timed task detection tool, so that manual participation is not needed, and the efficiency of acquiring the timed task code blocks is improved. After the timed task code block is obtained, the timed task code block is stored in the corresponding timed task project, and the timed task project is processed by adopting a compiling and packing tool to obtain a timed task Jar packet. And then acquiring the target Jar package through a project dependency management tool to realize corresponding business logic. And finally, storing the timing task Jar package and the target Jar package in the Lib folder, and monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink frame, so that centralized and unified management of timing task code blocks is realized. And acquiring a modification operation sent by the timing task monitoring end, wherein the parameter modification cannot be directly carried out on the packetized timing task Jar packet, so that the modification of the timing task Jar packet is realized by modifying the target attribute file. And calling the corresponding Jar packet which is dynamically loaded or Jar packet with an unloading function from the target Jar packet by acquiring the adding or deleting operation sent by the timing task monitoring end, so that the adding or deleting operation of the timing task Jar packet to be processed is realized, and the flexible configuration of the timing task Jar packet is realized.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In one embodiment, a timed task management device is provided, where the timed task management device corresponds to the timed task management method in the above embodiment one by one. As shown in fig. 8, the timed task management device includes a code block acquisition module 10, a timed task Jar packet acquisition module 20, a target Jar packet acquisition module 30, and a Jar packet monitoring management module 40. The functional modules are described in detail as follows:
the code block obtaining module 10 is configured to obtain a timed task code block by scanning source codes of a server cluster connected to a timed task management server through a pre-deployed timed task detection tool.
The timed task Jar packet obtaining module 20 is configured to store the timed task code block into a corresponding timed task project, and compile and package the timed task project by using a compiling and packaging tool to obtain a timed task Jar packet.
The target Jar package obtaining module 30 is configured to obtain an operation request corresponding to the timed task Jar package, where the operation request includes a request identifier, and obtain, based on the request identifier, a target Jar package corresponding to the request identifier from a third party class library through the project dependency management tool.
And the Jar packet monitoring management module 40 is configured to store the timing task Jar packet and the target Jar packet in the Lib folder, and monitor and manage the timing task Jar packet and the target Jar packet in the Lib folder by adopting the garsrlink framework.
Further, the code block acquisition module 10 includes a timed task detection tool deployment unit 11 and a timed task code block acquisition unit 12.
A timed task detection tool acquiring unit 11, configured to acquire a preconfigured timed task detection tool, where the timed task detection tool includes a timed task identifier.
And the timed task code block obtaining unit 12 is used for recursively scanning the application programs in the server cluster by adopting a timed task detection tool to obtain timed task code blocks matched with the timed task identification.
Further, the timed task management device further includes a task attribute file acquisition module 101 and a timed task Jar modification module 102.
The task attribute file acquisition module 101 is configured to acquire a task attribute file corresponding to the timed task code block from a server cluster connected to the timed task management server, and store the task attribute file in the database.
The timed task Jar package modification module 102 is configured to modify a timed task Jar package corresponding to a task attribute file based on the task attribute file.
Further, the timed task Jar package modification module 102 includes a login request acquisition unit 1021, a modification operation request acquisition unit 1022, a target task attribute file acquisition unit 1023, and a Jar package modification unit 1024.
A login request obtaining unit 1021, configured to obtain a login request sent by the timed task monitoring end, where the login request includes a login account and a login password.
The modification operation request obtaining unit 1022 is configured to verify the login account id and the login password, and if the login account id and the login password pass the verification, obtain a modification operation request sent by the timing task monitoring end, where the modification operation request includes a file identifier.
A target task attribute file acquisition unit 1023 for acquiring a target task attribute file corresponding to the file identification based on the file identification.
And a Jar package modification unit 1024, configured to modify the target task attribute file based on the modification operation request, and complete the modification operation of the timed task Jar package corresponding to the task attribute file.
Further, the Jar packet monitoring management module 40 includes an add operation requesting unit 411, a first task to be processed Jar packet obtaining unit 412, and a first monitoring management unit 413.
An add operation request unit 411, configured to obtain an add operation request, where the add operation request carries a packet name of a timing task Jar packet to be processed.
The first task to be processed Jar packet obtaining unit 412 is configured to obtain, by using a packet name of the timing task to be processed Jar packet, a task to be processed Jar packet corresponding to the packet name of the timing task Jar packet.
The first monitoring management unit 413 is configured to obtain, by adding an operation request, a dynamically loaded Jar packet corresponding to the operation request from the target Jar packet, and complete a monitoring management operation of the task Jar packet to be processed through the korslink framework.
Further, the Jar packet monitoring management module 40 further includes a delete operation request acquiring unit 421, a second task to be processed Jar packet acquiring unit 422, and a second monitoring management unit 423.
The delete operation request obtaining unit 421 is configured to obtain a delete operation request, where the delete operation request carries a packet name of the timing task Jar packet to be processed.
The second pending task Jar packet obtaining unit 422 is configured to obtain, by using a packet name of the pending timed task Jar packet, a pending task Jar packet corresponding to the packet name of the timed task Jar packet.
The second monitoring management unit 423 is configured to obtain, from the target Jar package, a Jar package of an offload function corresponding to the delete operation request through the delete operation request, and complete a monitoring management operation of the task Jar package to be processed through the korslink framework.
For specific limitations of the timed task management device, reference may be made to the above limitations of the timed task management method, and no further description is given here. The various modules in the timed task management device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data involved in the timed task management method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a timed task management method.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above embodiment timing task management method when executing the computer program, such as steps S10 to S40 shown in fig. 2. Alternatively, the computer program when executed by the processor implements the functions of the modules/units of the above-described embodiment timing task management apparatus, such as the modules 10 to 40 shown in fig. 8. In order to avoid repetition, a description thereof is omitted.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the steps of the above-described embodiment timing task management method, such as steps S10 to S40 shown in fig. 2. Alternatively, the computer program when executed by the processor implements the functions of the modules/units of the above-described embodiment timing task management apparatus, such as the modules 10 to 40 shown in fig. 8. In order to avoid repetition, a description thereof is omitted.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (8)

1. A timed task management method comprising the steps of:
scanning source codes of a server cluster connected with the timing task management server through a pre-deployed timing task detection tool to obtain timing task code blocks;
Acquiring a task attribute file corresponding to the timed task code block from a server cluster connected with the timed task management server, and storing the task attribute file in a database;
obtaining a login request sent by a timing task monitoring end, wherein the login request comprises a login account and a login password; verifying the login account and the login password, and if the login account and the login password pass the verification, acquiring a modification operation request sent by a timing task monitoring end, wherein the modification operation request comprises a file identifier; acquiring a target task attribute file corresponding to the file identification based on the file identification; modifying the target task attribute file based on the modification operation request to complete modification operation of a timing task Jar package corresponding to the task attribute file;
storing the timed task code blocks into corresponding timed task projects, and compiling and packaging the timed task projects by adopting a compiling and packaging tool to obtain timed task Jar packages;
acquiring an operation request corresponding to the timing task Jar package, wherein the operation request comprises a request identifier, and acquiring a target Jar package corresponding to the request identifier from a third party class library through a project dependency management tool based on the request identifier;
Storing the timing task Jar package and the target Jar package in a Lib folder, and monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink framework.
2. The timed task management method according to claim 1, wherein the acquiring timed task code block comprises:
acquiring a preconfigured timing task detection tool, wherein the timing task detection tool comprises a timing task identifier;
and performing recursion scanning on the application programs in the server cluster by adopting the timing task detection tool to acquire timing task code blocks matched with the timing task identifiers.
3. The method for managing timed tasks according to claim 1, wherein the monitoring and managing timed task Jar packages and target Jar packages in the Lib folder by using a garlink framework comprises:
acquiring an adding operation request, wherein the adding operation request carries the packet name of a timing task Jar packet to be processed;
acquiring a to-be-processed task Jar packet corresponding to the packet name of the to-be-processed timing task Jar packet through the packet name of the to-be-processed timing task Jar packet;
and acquiring a dynamically loaded Jar packet corresponding to the adding operation request from a target Jar packet through the adding operation request, and completing monitoring management operation of the Jar packet of the task to be processed through a JarsLink framework.
4. The method for managing timed tasks according to claim 1, wherein the monitoring of timed task Jar packages and target Jar packages in the Lib folder using a garlink framework further comprises;
acquiring a deletion operation request, wherein the deletion operation request carries the packet name of a timing task Jar packet to be processed;
acquiring a to-be-processed task Jar packet corresponding to the packet name of the to-be-processed timing task Jar packet through the packet name of the to-be-processed timing task Jar packet;
and acquiring the Jar packet of the unloading function corresponding to the deletion operation request from the target Jar packet through the deletion operation request, and completing the monitoring management operation of the Jar packet of the task to be processed through the JarsLink framework.
5. A timed task management device, comprising:
the code block acquisition module is used for scanning source codes of a server cluster connected with the timing task management server through a pre-deployed timing task detection tool to acquire timing task code blocks;
the task attribute file acquisition module is used for acquiring task attribute files corresponding to the timed task code blocks from a server cluster connected with the timed task management server and storing the task attribute files in the database;
The timing task Jar package modification module is used for acquiring a login request sent by a timing task monitoring end, wherein the login request comprises a login account number and a login password; verifying the login account and the login password, and if the login account and the login password pass the verification, acquiring a modification operation request sent by a timing task monitoring end, wherein the modification operation request comprises a file identifier; acquiring a target task attribute file corresponding to the file identification based on the file identification; modifying the target task attribute file based on the modification operation request to complete modification operation of a timing task Jar package corresponding to the task attribute file;
the timed task Jar packet acquisition module is used for storing the timed task code blocks into corresponding timed task projects, and compiling and packaging the timed task projects by adopting a compiling and packaging tool to acquire timed task Jar packets;
the target Jar package acquisition module is used for acquiring an operation request corresponding to the timing task Jar package, wherein the operation request comprises a request identifier, and the target Jar package corresponding to the request identifier is acquired from a third party class library through a project dependency management tool based on the request identifier;
And the Jar package management module is used for storing the timing task Jar package and the target Jar package in a Lib folder, and monitoring and managing the timing task Jar package and the target Jar package in the Lib folder by adopting a JarsLink framework.
6. The timed task management device according to claim 5, wherein the code block acquisition module comprises:
the timing task detection tool deployment unit is used for acquiring a preconfigured timing task detection tool, wherein the timing task detection tool comprises a timing task identifier;
and the timed task code block acquisition unit is used for recursively scanning the application programs in the server cluster by adopting the timed task detection tool to acquire timed task code blocks matched with the timed task identifiers.
7. Computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the timed task management method according to any one of claims 1 to 4 when the computer program is executed.
8. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the timed task management method according to any one of claims 1 to 4.
CN201810959335.4A 2018-08-22 2018-08-22 Timing task management method, device, computer equipment and storage medium Active CN109254765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810959335.4A CN109254765B (en) 2018-08-22 2018-08-22 Timing task management method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810959335.4A CN109254765B (en) 2018-08-22 2018-08-22 Timing task management method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109254765A CN109254765A (en) 2019-01-22
CN109254765B true CN109254765B (en) 2023-08-25

Family

ID=65050261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810959335.4A Active CN109254765B (en) 2018-08-22 2018-08-22 Timing task management method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109254765B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110109712A (en) * 2019-04-04 2019-08-09 平安科技(深圳)有限公司 Service Component loading method, device, computer equipment and storage medium
CN110597553A (en) * 2019-09-10 2019-12-20 浙江大搜车软件技术有限公司 Task execution method and device, computer equipment and readable storage medium
CN111158741B (en) * 2019-12-23 2024-04-12 北京五八信息技术有限公司 Method and device for monitoring dependency relationship change of service module on third party class library
CN113722057A (en) * 2021-03-12 2021-11-30 京东数字科技控股股份有限公司 Big data cluster processing method and system, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520952A (en) * 2011-12-14 2012-06-27 北京佳讯飞鸿电气股份有限公司 Automatic construction and issuing method of software code version
CN106104467A (en) * 2014-06-30 2016-11-09 北京新媒传信科技有限公司 A kind of Automation arranging method and terminal
CN107589966A (en) * 2017-09-22 2018-01-16 郑州云海信息技术有限公司 The method and apparatus of management code in software development system
CN107729066A (en) * 2017-11-08 2018-02-23 重庆扬讯软件技术股份有限公司 One kind is based on SVN resources banks automation structure dissemination method and device
CN107748695A (en) * 2017-10-24 2018-03-02 平安科技(深圳)有限公司 Timed task processing method, device, storage medium and computer equipment
CN107894919A (en) * 2017-11-30 2018-04-10 中国平安财产保险股份有限公司 Timed task triggering method, device, equipment and readable storage medium storing program for executing
CN108173892A (en) * 2016-12-07 2018-06-15 腾讯科技(深圳)有限公司 High in the clouds mirror image operation method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10261763B2 (en) * 2016-12-13 2019-04-16 Palantir Technologies Inc. Extensible data transformation authoring and validation system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520952A (en) * 2011-12-14 2012-06-27 北京佳讯飞鸿电气股份有限公司 Automatic construction and issuing method of software code version
CN106104467A (en) * 2014-06-30 2016-11-09 北京新媒传信科技有限公司 A kind of Automation arranging method and terminal
CN108173892A (en) * 2016-12-07 2018-06-15 腾讯科技(深圳)有限公司 High in the clouds mirror image operation method and device
CN107589966A (en) * 2017-09-22 2018-01-16 郑州云海信息技术有限公司 The method and apparatus of management code in software development system
CN107748695A (en) * 2017-10-24 2018-03-02 平安科技(深圳)有限公司 Timed task processing method, device, storage medium and computer equipment
CN107729066A (en) * 2017-11-08 2018-02-23 重庆扬讯软件技术股份有限公司 One kind is based on SVN resources banks automation structure dissemination method and device
CN107894919A (en) * 2017-11-30 2018-04-10 中国平安财产保险股份有限公司 Timed task triggering method, device, equipment and readable storage medium storing program for executing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
彩铃Web服务器定时调度框架设计及应用;王强;王纯;朱晓民;廖建新;;北京工商大学学报(自然科学版)(06);全文 *

Also Published As

Publication number Publication date
CN109254765A (en) 2019-01-22

Similar Documents

Publication Publication Date Title
CN109254765B (en) Timing task management method, device, computer equipment and storage medium
CN108197200B (en) Log tracking method and device, computer equipment and storage medium
CN108804618B (en) Database configuration method, device, computer equipment and storage medium
WO2020192134A1 (en) Exception handling method and apparatus based on spring mvc, and computer device and storage medium
CN109726134B (en) Interface test method and system
CN109032631B (en) Application program patch package obtaining method and device, computer equipment and storage medium
CN111949899B (en) Service integration method and service platform
CN112769706B (en) Componentized routing method and system
CN113220431B (en) Cross-cloud distributed data task scheduling method, device and storage medium
CN110764788B (en) Cloud storage deployment method and device, computer equipment and readable storage medium
CN114531477B (en) Method and device for configuring functional components, computer equipment and storage medium
CN113377668A (en) Automatic testing method and device for service interface and computer equipment
CN110362356B (en) Function data processing method and device, computer equipment and storage medium
CN113835713B (en) Source code packet downloading method, device, computer equipment and storage medium
CN111666211A (en) Dynamic service test method and device, computer equipment and storage medium
CN113986734A (en) Code coverage report generation method, device, equipment and medium
CN112235124B (en) Method and device for configuring pico-cell, storage medium and electronic device
CN110727477B (en) Component loading method and device, computer equipment and storage medium
CN112559352A (en) Interface test method, device, equipment and storage medium
CN112035163A (en) Software development kit configuration method, device and storage medium
CN110308999B (en) Method for dynamically sharing dependency package between applications, storage medium and mobile terminal
CN105354081A (en) Synchronous service binding method and apparatus
CN115390944A (en) Algorithm service calling method and device, electronic equipment and storage medium
CN114860204A (en) Program processing method, program operating device, terminal, smart card and storage medium
CN113778647A (en) Call request processing method, system and test equipment

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
GR01 Patent grant
GR01 Patent grant