CN111475272A - Method and device for controlling Java Web application timing task and task scheduling platform - Google Patents

Method and device for controlling Java Web application timing task and task scheduling platform Download PDF

Info

Publication number
CN111475272A
CN111475272A CN202010265037.2A CN202010265037A CN111475272A CN 111475272 A CN111475272 A CN 111475272A CN 202010265037 A CN202010265037 A CN 202010265037A CN 111475272 A CN111475272 A CN 111475272A
Authority
CN
China
Prior art keywords
web application
task
java web
timing task
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.)
Pending
Application number
CN202010265037.2A
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.)
Sichuan Hongmei Intelligent Technology Co Ltd
Original Assignee
Sichuan Hongmei Intelligent 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 Sichuan Hongmei Intelligent Technology Co Ltd filed Critical Sichuan Hongmei Intelligent Technology Co Ltd
Priority to CN202010265037.2A priority Critical patent/CN111475272A/en
Publication of CN111475272A publication Critical patent/CN111475272A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for controlling Java Web application timing tasks, a task scheduling platform and a computer readable medium, wherein the method comprises the steps that the task scheduling platform receives a timing task starting request carrying an identification code; searching an actuator corresponding to the timing task and the configuration of the timing task in the task scheduling platform according to the identification code carried in the timing task starting request; obtaining Java Web application for executing the timing task according to the executor; and the task scheduling platform sends the configuration of the timing task to the Java Web application, and the Java Web application executes the timing task according to the configuration of the timing task. The scheme of the invention ensures the stability of Java Web application while modifying the timing task.

Description

Method and device for controlling Java Web application timing task and task scheduling platform
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for controlling Java Web application timing tasks.
Background
In Java Web applications, there are generally three ways of using timed tasks. The first is to adopt Timer class to schedule the timing task; the second is to adopt a scheduled executorservice class to schedule the timing task; and the third method is to integrate a timed task framework Quartz in a Java Web application to schedule a timed task.
When the Timer type is adopted to schedule the timing tasks, because all the timing tasks are executed in one thread, the problems that the thread is hung up if a certain timing task is caused, or the execution time of a certain timing task is too long, other timing tasks need to wait and the like can occur; when the scheduled executorservice class is adopted to schedule the timing task, compared with the scheduling of the timing task by the Timer class, the timing task can be executed in a multi-thread mode, but the configuration mode of the timing task execution time is not flexible enough, the timing task execution strategy cannot be configured in a more complex mode, the timing task execution strategy is not suitable for a scene with more complex execution time requirements, and a large number of tasks to be executed can be accumulated in a cache queue, so that the overflow exception of a program memory is easily caused; the method for integrating the timed task framework Quartz in the Java Web application to schedule the timed task has the advantage of multi-thread execution, and can also configure more complex time rules. However, in this scheduling method, all configurations and codes are integrated inside the Java Web application, and when the configuration of some timing tasks needs to be modified, the server needs to be suspended and restarted after the configuration is modified, which affects the stability of the Java Web application.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling a Java Web application timing task, a task scheduling platform and a computer readable medium.
In a first aspect, an embodiment of the present invention provides a method for controlling a Java Web application timing task, where the method includes:
a task scheduling platform receives a timing task starting request carrying an identification code;
searching an actuator corresponding to the timing task and the configuration of the timing task in the task scheduling platform according to the identification code carried in the timing task starting request;
obtaining Java Web application for executing the timing task according to the executor;
and the task scheduling platform sends the configuration of the timing task to the Java Web application so that the Java Web application executes the timing task according to the configuration of the timing task.
Optionally, the obtaining, according to the executor, a Java Web application for executing the timing task further includes:
determining the Java Web application for executing the timing task according to the name of the executor and the registration information of the Java Web application registered in the task scheduling platform;
the registration information comprises the name of the Java Web application, and the name of the Java Web application is the same as the name of the executor.
Optionally, the sending, by the task scheduling platform, the configuration of the timing task to the Java Web application, and executing, by the Java Web application, the timing task according to the configuration of the timing task further includes:
the task scheduling platform obtains a client and a port where the Java Web application is located according to the registration information of the Java Web application;
and sending the configuration of the timing task to the Java Web application according to the client and the port where the Java Web application is located.
Optionally, the executing, by the Java Web application, the timed task according to the configuration of the timed task further includes:
after the Java Web application executes a single timing task, checking log information output by the execution of the single timing task;
and if the log information is correct, the Java Web application is instructed to execute the timing task according to the time interval in the timing task configuration.
In a second aspect, the present invention provides a task scheduling platform, including:
the receiving unit is used for receiving a timing task starting request carrying an identification code;
determining an executor and a timing task configuration unit, which are used for searching the executor corresponding to the timing task and the configuration of the timing task according to the identification code carried in the timing task starting request;
determining a Java Web application unit, which is used for obtaining a Java Web application used for executing the timing task according to the actuator;
and the execution unit is used for sending the configuration of the timing task to the Java Web application and executing the timing task by the Java Web application according to the configuration of the timing task.
Optionally, the determining Java Web application unit is further configured to:
determining the Java Web application for executing the timing task according to the name of the executor and the registration information of the Java Web application registered in the task scheduling platform;
the registration information comprises the name of the Java Web application, and the name of the Java Web application is the same as the name of the executor.
Optionally, the execution unit is further configured to:
obtaining a client and a port where the Java Web application is located according to the registration information of the Java Web application;
and sending the configuration of the timing task to the Java Web application according to the client and the port where the Java Web application is located.
Optionally, the execution unit is further configured to:
after the Java Web application executes a single timing task, checking log information output by the execution of the single timing task;
and if the log information is correct, the Java Web application is instructed to execute the timing task according to the time interval in the timing task configuration.
In a third aspect, the present invention further provides a device for controlling Java Web application timing tasks, which is characterized by comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
and the at least one processor is used for calling the machine readable program and executing the method for controlling the timing task of the Java Web application.
In a fourth aspect, the present invention also provides a computer readable medium, wherein the computer readable medium has stored thereon computer instructions, which, when executed by a processor, cause the processor to execute the above method for controlling Java Web application timing tasks.
According to the method for controlling the timed task of the Java Web application, the timed task is configured on the task scheduling platform, the connection is established between the task scheduling platform and the Java Web application of the client, the timed task of each Java Web application is configured, and the operations of adding, deleting, starting, stopping and the like can be executed on the timed task in each Java Web application on the task scheduling platform. When the configuration of the timing task needs to be modified, on one hand, the Java Web application does not need to be paused and restarted after the configuration is modified, and the influence on the Java Web application is avoided; on the other hand, when the task scheduling platform configures the timing task, the timing task can be configured to execute in multiple threads, and a complex task execution time rule is set, so that the method is suitable for various application scenarios; on the other hand, the task scheduling platform can be connected with Java Web applications of a plurality of clients and centrally manages the timing tasks of the Java Web applications.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for controlling a Java Web application timing task according to an embodiment of the present invention;
FIG. 2 is a communication manner between the task scheduling platform and the Java Web application according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a task scheduling platform according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for controlling a Java Web application timing task, where the method may include the following steps:
s100: a task scheduling platform receives a timing task starting request carrying an identification code;
s200: searching an actuator corresponding to the timing task and the configuration of the timing task in a task scheduling platform according to the identification code carried in the timing task starting request;
s300: obtaining Java Web application for executing the timing task according to the executor;
s400: and the task scheduling platform sends the configuration of the timing task to the Java Web application, and the Java Web application executes the timing task according to the configuration of the timing task.
Before executing the method for controlling the timing task of the Java Web application, the Java Web application of the task scheduling platform and each client needs to be set.
For example, a packaged war packet is copied into an application directory of a Tomcat server, the Tomcat server is started, an address used by a client is obtained, such as http:// localhost:8080, after the client logs in the task scheduling platform for the first time by using an account password, no actuator and timing tasks can be seen.
The Java Web application of the client registers the Java Web application to the task scheduling platform and establishes connection with the task scheduling platform. When the Java Web application of the client registers the Java Web application to the task scheduling platform, the registration information comprises ip, ports, class names of timed task implementation classes and the like. After receiving the registration of the Java Web application, the task scheduling platform configures the timing task of the Java Web application, and the provided configuration comprises selection of an actuator, a task name, a task execution time interval (for example, execution is performed once every 5 minutes), the number of times of failure retry, an alarm mail address and the like. Meanwhile, the task scheduling platform adds an executor, the name of the configured executor is the same as the name of the Java Web application where the timing task is located, so that the executor in the task scheduling platform is associated with the Java Web application of the client, and certainly, other identification codes can be configured for the timing task and the executor, so that the executor in the task scheduling platform is associated with the Java Web application of the client.
When the timed task needs to be executed, the task scheduling platform can find the host and the port where the client Java Web application is located according to the registration information, send the configuration of the timed task to the Java Web application, and execute the timed task by the Java Web application. As shown in fig. 2, the task scheduling platform may interact with the Java Web application of the client in a manner of a Hyper Text Transfer Protocol (HTTP) interface, that is, when the timed task needs to be executed, the task scheduling platform may find a host and a port where the Java Web application of the client is located according to the registration information, and send the configuration of the timed task to the Java Web application through the HTTP interface, so that the Java Web application executes the timed task.
The task scheduling platform is deployed on a background server, and can be accessed by a browser through UR L, namely, the start, stop and the like of a timing button can be controlled in a timing task management interface corresponding to the task scheduling platform, and timing task information and an operation button for controlling the timing task are displayed on the timing task management interface.
When a user clicks an execution button which can trigger a timing task once in a timing task management interface, a task scheduling platform can receive a timing task starting request carrying an identification code, wherein the identification code can be the name of the timing task or the id of the timing task, the identification code of the timing task is not specifically limited, and the task scheduling platform can be used as long as an actuator corresponding to the timing task can be found according to the identification code of the timing task and a JavaWeb application executing the timing task can be found according to the actuator.
After receiving the timing task starting request, the task scheduling platform searches an actuator corresponding to the timing task and the configuration of the timing task in the task scheduling platform according to the identification code carried by the task scheduling platform.
When the timing task is configured, the task scheduling platform provides an executor for the timing task to identify which Java Web application the timing task is. As mentioned above, the configured name of the actuator is the same as the name of the Java Web application where the timing task is located, so as to associate the actuator in the task scheduling platform with the Java Web application at the client, and the name of the timing task may also be set as the name of the Java Web application, and the identification code carried in the timing task start request may be the name of the Java Web application, so that the actuator corresponding to the timing task and the configuration of the timing task may be found in the task scheduling platform according to the identification code carried in the timing task start request.
And searching the Java Web application corresponding to the executor in all the Java Web applications registered in the task scheduling platform according to the executor corresponding to the timing task. For example, when the name of the executor in the task scheduling platform is the same as the name of the Java Web application of the client, according to the name of the executor corresponding to the timing task, the Java Web application having the same name as the executor can be found from all Java Web applications registered in the task scheduling platform, and the Java Web application is used for executing the timing task to be started.
After finding out the Java Web application executing the timing task to be started, the task scheduling platform sends the configuration of the timing task to be started to the Java Web application of the client through the interface, and the Java Web application of the client executes the timing task according to the configuration and the timing task execution logic.
The invention provides a task scheduling platform, which is connected with Java Web applications of a client side, configures timing tasks of the Java Web applications and can execute operations of adding, deleting, starting, stopping and the like on the timing tasks in the Java Web applications. When the configuration of the timing task needs to be modified, on one hand, the Java Web application does not need to be paused and restarted after the configuration is modified, and the influence on the Java Web application is avoided; on the other hand, when the task scheduling platform configures the timing task, the multi-thread execution can be performed when the timing task is configured, and a complex task execution time rule is set, so that the method is suitable for various application scenarios; on the other hand, the task scheduling platform can be connected with Java Web applications of a plurality of clients and centrally manages the timing tasks of the Java Web applications.
Further, obtaining, according to the executor, a Java Web application for executing the timed task further includes:
determining the Java Web application for executing the timing task according to the name of the executor and the registration information of the Java Web application registered in the task scheduling platform;
the registration information comprises the name of the Java Web application, and the name of the Java Web application is the same as the name of the executor.
Every Java Web application is registered to the task scheduling platform, an actuator is added to the task scheduling platform, and information of the actuator is associated with information of the Java Web application registered to the task scheduling platform, for example, the name of the actuator is the same as the name of the Java Web application, and for example, the id of the actuator is the same as the id of the Java Web application, and the id of the actuator corresponds to the id of the Java Web application one by one and does not correspond to the ids of other Java Web applications. The information related to the executor and the Java Web application is not particularly limited, as long as the Java Web application can be found according to the executor. Taking the name of the executor and the name of the Java Web application as an example, after the task scheduling platform receives the timed task start request and determines the executor corresponding to the timed task, the Java Web application for executing the timed task may be determined according to the name of the executor and the registration information of the Java Web application registered in the task scheduling platform.
Further, the task scheduling platform sends the configuration of the timing task to the Java Web application, and the executing of the timing task by the Java Web application according to the configuration of the timing task further includes:
the task scheduling platform obtains a client and a port where the Java Web application is located according to the registration information of the Java Web application;
and sending the configuration of the timing task to the Java Web application according to the client and the port where the Java Web application is located.
It is also mentioned above that, when the Java Web application at the client registers itself to the task scheduling platform, the registration information includes ip, port, class name of the timed task implementation class, and the like, so that the task scheduling platform can obtain the client and the port where the Java Web application is located according to the registration information of the Java Web application, and after obtaining the client and the port of the Java Web application, the task scheduling platform can send the configuration of the timed task to the Java Web application.
Therefore, compared with the prior art that the configuration of the timing task is arranged in the Java Web application, the state of the Java Web application is not influenced when the timing task is modified because the configuration of the timing task is arranged in the Java Web application.
Further, the executing, by the Java Web application, the timed task according to the configuration of the timed task further includes:
after the Java Web application executes a single timing task, checking log information output by the execution of the single timing task;
and if the log information is correct, the Java Web application is instructed to execute the timing task according to the time interval in the timing task configuration.
The method comprises the steps that a visual Web interface corresponding to a task scheduling platform is provided with two buttons for triggering a timing task, after the timing task is configured by the task scheduling platform, an execution button for triggering the execution of the task once is clicked, and if the execution is correct, a start button capable of being executed according to a time rule configured by the timing task is clicked.
It should be noted that the task scheduling platform may include a log unit, where the log unit is configured to collect log information output by all timing tasks, that is, the execution condition of the timing task may be queried, and the execution condition of the timing task triggered once by clicking may be obtained by querying the log information, that is, before the execution time rule is executed according to the configured timing task, whether the execution of the timing task is correct is tested, so that the accuracy of executing the timing task is improved.
The method for controlling the Java Web application timing task is described by taking the Java Web application as a data billboard application as an example, the data billboard application calculates data to be displayed on a page from each data source through the timing task, and stores the calculated data in a database for the page to access quickly and in real time.
The data billboard application has a timing task of fault statistical data, and when the timing task is configured on the task scheduling platform and the data billboard application registers the timing task to the task scheduling platform, the timing task of the fault statistical data is directly started on the task scheduling platform; when the timing task is configured on the task scheduling platform but the data billboard application is not registered on the task scheduling platform, the data billboard application registers information such as a client, a port and an application name where the data billboard application is located on the task scheduling platform so as to execute the timing task of the fault statistical data; when the timing task of the fault statistical data is not configured in the task scheduling platform and the data billboard application is not registered in the task scheduling platform, the data billboard application is to be registered in the task scheduling platform, and the timing task of the fault statistical data is configured in the task scheduling platform, and in the actual execution process, the timing task of the fault statistical data may be:
the data billboard application registers the address of the client where the data billboard application is located, such as 127.0.0.1, the port, such as 8080, the name of the data billboard application, such as databoard, to the task scheduling platform, and after the registration is completed, the data billboard application is started.
After the data billboard application is registered to the task scheduling platform, the task scheduling platform adds an executor corresponding to the data billboard application, for example, an executor with a name also being a databoard, and because the name is the same as the name of the data billboard application, the executor of the task scheduling platform and the data billboard application can be associated. After the executor is added, the task scheduling platform sees the active executor, and then adds the timing task with the failure statistics data on the executor named as the databoard, and configures the execution time rule for the timing task, and configures a full class name where the logic code of the timing task is located, such as cn.
After the data billboard application and the fault statistic data are configured, a task management interface is used, for example, by accessing UR L address http:// localhost:8080, an execution button of fault data statistics is clicked to trigger the execution of the fault statistic data once, if the execution is correct, a start button of the fault data statistics is clicked, so that the timing task of the fault statistic data is executed according to the configured time rule, and if the configuration of the timing task needs to be stopped or modified, a stop button is clicked on the task management interface.
It can be known from the above embodiments that the task scheduling platform is an independent Web service, and the configuration of the timed task of the Java Web application on the task scheduling platform can avoid stopping the Java Web application and restarting the Java Web application after modifying the configuration of the timed task when the configuration of some timed tasks needs to be modified, so that the stability of the online Java Web application is not affected.
Based on the same inventive concept, as shown in fig. 3, an embodiment of the present invention provides a task scheduling platform 300, where the task scheduling platform 300 includes:
a receiving unit 301, configured to receive a timing task start request carrying an identification code;
a determining executor and timing task configuration unit 302, configured to search, according to the identification code carried in the timing task start request, an executor corresponding to the timing task and configuration of the timing task;
a Java Web application determining unit 303, configured to obtain, according to the actuator, a Java Web application for executing the timing task;
and the execution unit 304 is configured to send the configuration of the timing task to the Java Web application, and execute the timing task by the Java Web application according to the configuration of the timing task.
Further, the Java Web application unit 303 is further configured to:
determining the Java Web application for executing the timing task according to the name of the executor and the registration information of the Java Web application registered in the task scheduling platform;
the registration information comprises the name of the Java Web application, and the name of the Java Web application is the same as the name of the executor.
Further, the execution unit 304 is further configured to:
obtaining a client and a port where the Java Web application is located according to the registration information of the Java Web application;
and sending the configuration of the timing task to the Java Web application according to the client and the port where the Java Web application is located.
Further, the execution unit 304 is further configured to:
after the Java Web application executes a single timing task, checking log information output by the execution of the single timing task;
and if the log information is correct, the Java Web application is instructed to execute the timing task according to the time interval in the timing task configuration.
The information interaction, the execution process and other contents between the units in the task scheduling platform are based on the same concept as the method embodiment of the present invention, and specific contents can be referred to the description in the method embodiment of the present invention, and are not described herein again.
The invention also provides a device for controlling the Java Web application timing task, which is characterized by comprising the following steps: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
and the at least one processor is used for calling the machine readable program and executing the method for controlling the timing task of the Java Web application.
It is to be understood that the schematic structure of the embodiment of the present invention does not constitute a specific limitation to the apparatus for controlling the Java Web application timing task. In other embodiments of the invention the means for controlling the timing tasks of the Java Web application may comprise more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The present invention also provides a computer readable medium storing instructions for causing a computer to perform the method of controlling Java Web application timing tasks as described herein. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
It should be noted that not all steps and modules in the above flows and system structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
In the above embodiments, the hardware unit may be implemented mechanically or electrically. For example, a hardware element may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware elements may also comprise programmable logic or circuitry, such as a general purpose processor or other programmable processor, that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that various combinations of the code auditing means in the various embodiments described above may be used to obtain further embodiments of the invention, which are also within the scope of the invention.

Claims (10)

1. A method for controlling Java Web application timing tasks, the method comprising:
a task scheduling platform receives a timing task starting request carrying an identification code;
searching an actuator corresponding to the timing task and the configuration of the timing task in the task scheduling platform according to the identification code carried in the timing task starting request;
obtaining Java Web application for executing the timing task according to the executor;
and the task scheduling platform sends the configuration of the timing task to the Java Web application so that the Java Web application executes the timing task according to the configuration of the timing task.
2. The method of claim 1, wherein obtaining, according to the executor, a Java Web application for executing the timed task further comprises:
determining the Java Web application for executing the timing task according to the name of the executor and the registration information of the Java Web application registered in the task scheduling platform;
the registration information comprises the name of the Java Web application, and the name of the Java Web application is the same as the name of the executor.
3. The method of claim 1 or 2, wherein the task scheduling platform sends the configuration of the timed task to the Java Web application, and wherein executing the timed task by the Java Web application according to the configuration of the timed task further comprises:
the task scheduling platform obtains a client and a port where the Java Web application is located according to the registration information of the Java Web application;
and sending the configuration of the timing task to the Java Web application according to the client and the port of the Java Web application.
4. The method of claim 1, wherein executing the timed task by the Java Web application in accordance with the configuration of the timed task further comprises:
after the Java Web application executes a single timing task, checking log information output by the execution of the single timing task;
and if the log information is correct, the Java Web application is instructed to execute the timing task according to the time interval in the timing task configuration.
5. A task scheduling platform, comprising:
the receiving unit is used for receiving a timing task starting request carrying an identification code;
determining an executor and a timing task configuration unit, which are used for searching the executor corresponding to the timing task and the configuration of the timing task according to the identification code carried in the timing task starting request;
determining a Java Web application unit, which is used for obtaining a Java Web application used for executing the timing task according to the actuator;
and the execution unit is used for sending the configuration of the timing task to the Java Web application and executing the timing task by the Java Web application according to the configuration of the timing task.
6. The task scheduling platform of claim 5, wherein the determine Java Web application unit is further to:
determining the Java Web application for executing the timing task according to the name of the executor and the registration information of the Java Web application registered in the task scheduling platform;
the registration information comprises the name of the Java Web application, and the name of the Java Web application is the same as the name of the executor.
7. The system of claim 5 or 6, wherein the execution unit is further configured to:
obtaining a client and a port where the Java Web application is located according to the registration information of the Java Web application;
and sending the configuration of the timing task to the Java Web application according to the client and the port of the Java Web application.
8. The task scheduling platform of claim 5, wherein the execution unit is further to:
after the Java Web application executes a single timing task, checking log information output by the execution of the single timing task;
and if the log information is correct, the Java Web application is instructed to execute the timing task according to the time interval in the timing task configuration.
9. Device for controlling timed tasks of Java Web applications, comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor, configured to invoke the machine readable program to perform the method of any of claims 1 to 4.
10. Computer readable medium, characterized in that it has stored thereon computer instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 4.
CN202010265037.2A 2020-04-07 2020-04-07 Method and device for controlling Java Web application timing task and task scheduling platform Pending CN111475272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010265037.2A CN111475272A (en) 2020-04-07 2020-04-07 Method and device for controlling Java Web application timing task and task scheduling platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010265037.2A CN111475272A (en) 2020-04-07 2020-04-07 Method and device for controlling Java Web application timing task and task scheduling platform

Publications (1)

Publication Number Publication Date
CN111475272A true CN111475272A (en) 2020-07-31

Family

ID=71750655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010265037.2A Pending CN111475272A (en) 2020-04-07 2020-04-07 Method and device for controlling Java Web application timing task and task scheduling platform

Country Status (1)

Country Link
CN (1) CN111475272A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148447A (en) * 2020-09-22 2020-12-29 京东数字科技控股股份有限公司 Task processing method and system based on risk control and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201671A (en) * 2015-04-29 2016-12-07 北大方正集团有限公司 Method for scheduling task and device in one cluster deployed environment
CN106201672A (en) * 2016-06-22 2016-12-07 武汉斗鱼网络科技有限公司 A kind of timed task arranges system and timed task operation method thereof
CN108710532A (en) * 2018-05-21 2018-10-26 平安科技(深圳)有限公司 Across dependence implementation method, device, equipment and the storage medium of dispatching platform
CN108710537A (en) * 2018-04-09 2018-10-26 平安科技(深圳)有限公司 A kind of task processing method, storage medium and server
CN108762900A (en) * 2018-05-21 2018-11-06 平安科技(深圳)有限公司 High frequency method for scheduling task, system, computer equipment and storage medium
US20190114202A1 (en) * 2017-10-13 2019-04-18 Beijing Baidu Netcom Science And Technology Co., Ltd. Task scheduling method and apparatus of artificial intelligence heterogeneous hardware, device and readable medium
CN109857482A (en) * 2018-12-31 2019-06-07 杭州洋驼网络科技有限公司 A kind of lightweight distributed task dispatching centring system
CN110515712A (en) * 2019-08-09 2019-11-29 精硕科技(北京)股份有限公司 Task management method and computer storage medium
CN110888721A (en) * 2019-10-15 2020-03-17 平安科技(深圳)有限公司 Task scheduling method and related device
CN110888725A (en) * 2019-11-21 2020-03-17 北京明略软件系统有限公司 Task management method and device, readable storage medium and electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201671A (en) * 2015-04-29 2016-12-07 北大方正集团有限公司 Method for scheduling task and device in one cluster deployed environment
CN106201672A (en) * 2016-06-22 2016-12-07 武汉斗鱼网络科技有限公司 A kind of timed task arranges system and timed task operation method thereof
US20190114202A1 (en) * 2017-10-13 2019-04-18 Beijing Baidu Netcom Science And Technology Co., Ltd. Task scheduling method and apparatus of artificial intelligence heterogeneous hardware, device and readable medium
CN108710537A (en) * 2018-04-09 2018-10-26 平安科技(深圳)有限公司 A kind of task processing method, storage medium and server
CN108710532A (en) * 2018-05-21 2018-10-26 平安科技(深圳)有限公司 Across dependence implementation method, device, equipment and the storage medium of dispatching platform
CN108762900A (en) * 2018-05-21 2018-11-06 平安科技(深圳)有限公司 High frequency method for scheduling task, system, computer equipment and storage medium
CN109857482A (en) * 2018-12-31 2019-06-07 杭州洋驼网络科技有限公司 A kind of lightweight distributed task dispatching centring system
CN110515712A (en) * 2019-08-09 2019-11-29 精硕科技(北京)股份有限公司 Task management method and computer storage medium
CN110888721A (en) * 2019-10-15 2020-03-17 平安科技(深圳)有限公司 Task scheduling method and related device
CN110888725A (en) * 2019-11-21 2020-03-17 北京明略软件系统有限公司 Task management method and device, readable storage medium and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘光明 等: "Web应用与Quartz的整合研究", 《企业科技与发展》 *
杨秀萍: "Java定时任务及其在工作流系统中的应用", 《现代电子技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148447A (en) * 2020-09-22 2020-12-29 京东数字科技控股股份有限公司 Task processing method and system based on risk control and electronic equipment
CN112148447B (en) * 2020-09-22 2024-04-16 京东科技控股股份有限公司 Task processing method and system based on risk control and electronic equipment

Similar Documents

Publication Publication Date Title
CN106559438B (en) Program uploading method and device based on target network platform
CN108399132B (en) Scheduling test method, device and storage medium
CN108228444B (en) Test method and device
EP2989543B1 (en) Method and device for updating client
US20110302569A1 (en) Facilitating the execution of web applications in the cloud
US8799923B2 (en) Determining relationship data associated with application programs
CN109634718B (en) Method and system for creating mirror image by cloud platform
CN109981716A (en) A kind of micro services call method and device
US7047526B1 (en) Generic command interface for multiple executable routines
CN111324423B (en) Method and device for monitoring processes in container, storage medium and computer equipment
WO2019051948A1 (en) Method, apparatus, server, and storage medium for processing monitoring data
CN114745295A (en) Data acquisition method, device, equipment and readable storage medium
CN113656357A (en) File management method, device, system and storage medium
CN111475272A (en) Method and device for controlling Java Web application timing task and task scheduling platform
CN106802790B (en) Method, equipment and system for managing application user use information based on cloud platform
CN113157426A (en) Task scheduling method, system, equipment and storage medium
JP2004118250A (en) Computer management system and management program
CN112527459A (en) Log analysis method and device based on Kubernetes cluster
CN112463549A (en) Auditing method, device and equipment of cloud platform and computer readable storage medium
CN109828784B (en) Task grabbing method and device
US9374437B2 (en) Schema validation proxy
JP5913155B2 (en) Packet replay device and packet replay method
CN114625594A (en) Configuration file generation method, log collection method, device, equipment and medium
JP2005157727A (en) Log processing method, and processing program and execution system of the same
JPWO2019220480A1 (en) Monitoring equipment, monitoring methods and programs

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200731