CN106569878A - Distributed timing task management method and system - Google Patents

Distributed timing task management method and system Download PDF

Info

Publication number
CN106569878A
CN106569878A CN201510645550.3A CN201510645550A CN106569878A CN 106569878 A CN106569878 A CN 106569878A CN 201510645550 A CN201510645550 A CN 201510645550A CN 106569878 A CN106569878 A CN 106569878A
Authority
CN
China
Prior art keywords
server
task
information
execution
pending
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
CN201510645550.3A
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510645550.3A priority Critical patent/CN106569878A/en
Publication of CN106569878A publication Critical patent/CN106569878A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

The invention discloses a distributed timing task management method and system. The distributed timing task management method includes: determining whether or not the current time matches the execution time of a task to be executed; acquiring server state information of a plurality of distributed servers; selecting an execution server matching the task to be executed from the plurality of distributed servers according to the server state information if the current time matches the execution time; and sending execution information for instructing execution of the task to be executed to the selected matched execution server so as to allow the execution server to execute the task to be executed according to the execution information. The distributed timing task management method and system can solve the problem how to achieve allocation and management of a large number and kinds of plan tasks, and can achieve balanced load of servers.

Description

A kind of distributed timing task management method and system
Technical field
The present invention relates to Internet technical field, more particularly to a kind of distributed timing task management method And system.
Background technology
In internet, applications hosting environment, the GAE (Google AppEngine) of such as Google, The SAE of Sina, is each provided with the service of plan target (Cron).Plan target is at the appointed time logical Cross HTTP (Hyper-Text Transfer Protocol, HTML (Hypertext Markup Language)) message and access a URL (UniformResource Locator, URL), and pass through URL access triggers applications The mission profile of logic.That is, plan target typically refers to, when indicated by the triggered time, perform A kind of event of task definition.
In the prior art, often by the management of such as calendar prompting, the progress of work and alarm clock etc Application program comprising plan target is realizing the execution of each plan target.It is described comprising plan target Application program is specifically intended to task in implement plan task and sends go to hold into corresponding server OK.However, with the development of Internet technology, the application of plan target is more and more extensive, plan target Number of executions and species it is also more and more, one of problem of this area urgent need to resolve is:It is right how to realize The distribution and management of the plan target of vast number and species, realizes the equilibrium of server load.
The content of the invention
In view of the above problems, it is proposed that the present invention overcomes the problems referred to above or at least part of to provide one kind A kind of fixed disk data enciphering method and system for solving the above problems.
According to one aspect of the present invention, there is provided a kind of distributed timing task management method, including:
Judge whether current time and the execution time of pending task match;And, obtain multiple points The server state information of cloth server;
When current time was matched with the execution time, according to the server state information from described The execute server matched with the pending task is selected in multiple distributed servers;
Matching to the selection will be sent for the execution information for indicating the execution pending task Execute server so that the execute server according to the execution information perform it is described pending Business.
According to another aspect of the present invention, there is provided a kind of distributed timing task management system, including:
Judge module, for judging whether current time and the execution time of pending task match;
Acquisition module, for obtaining the server state information of multiple distributed servers;
Selecting module, for when current time was matched with the execution time, according to the server Status information selects the execution matched with the pending task from the plurality of distributed server Server;
Task distribution module, for will be used for indicating the execution information for performing the pending task send to The execute server for matching of the selection, so that the execute server is held according to the execution information The row pending task.
The embodiment of the invention discloses a kind of distributed timing task management method, current time with it is described When the execution time matches, selected from the plurality of distributed server according to the server state information Select the execute server matched with the pending task;To be used for indicating to perform the pending task Execution information send to the execute server for matching of the selection so that the execute server root The pending task is performed according to the execution information.It can be seen that, in embodiments of the present invention, can basis The server state information of server dynamically selects server to go to perform the pending task, realizes Dynamically distributes and management to each server, pending task are not limited to what is fixed by only one Server realizing, that is, the load balancing of server is realized by the embodiment of the present invention, it is ensured that The treatment effeciency of server.Simultaneously as pending task is performed in the server of matching, therefore enter One step improves the execution efficiency of pending task and the success rate for performing.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the present invention's Technological means, and being practiced according to the content of description, and in order to allow the above-mentioned of the present invention and Other objects, features and advantages can become apparent, below especially exemplified by the specific embodiment party of the present invention Formula.
Description of the drawings
By the detailed description for reading hereafter preferred implementation, various other advantages and benefit for Those of ordinary skill in the art will be clear from understanding.Accompanying drawing is only used for the mesh for illustrating preferred implementation , and it is not considered as limitation of the present invention.And in whole accompanying drawing, with identical with reference to symbol Number represent identical part.In the accompanying drawings:
The step of Fig. 1 is a kind of distributed timing task management method in the embodiment of the present invention one flow chart;
The step of Fig. 2 is a kind of distributed timing task management method in the embodiment of the present invention two flow chart;
Fig. 3 is a kind of for realizing the distributed timing task management method in the embodiment of the present invention three The configuration diagram of total management system;
Fig. 4 is a kind of structured flowchart of distributed timing task management system in the embodiment of the present invention four;
Fig. 5 is a kind of structured flowchart of distributed timing task management system in the embodiment of the present invention five.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing in accompanying drawing The exemplary embodiment of the disclosure is shown, it being understood, however, that may be realized in various forms the disclosure And should not be limited by embodiments set forth here.On the contrary, there is provided these embodiments are able to more Thoroughly understand the disclosure, and can be by the scope of the present disclosure complete technology for conveying to this area Personnel.
Embodiment one
With reference to Fig. 1, a kind of step of distributed timing task management method in the embodiment of the present invention one is shown Rapid flow chart.In the present embodiment, timing plan target can be by being used to perform the distributed timing The task management system of task management method carries out unified adjustmenting management, selects the server of adaptation to perform Each timing plan target, realizes the equilibrium of load, reduces the human configuration flow process of user, improves The efficiency of management.
Wherein, the distributed timing task management method can include:
Step 102, judges whether current time and the execution time of pending task match;And, Obtain the server state information of multiple distributed servers.
In the present embodiment, judge whether the execution time of current time and pending task matches and obtain Two steps of server state information for taking multiple distributed servers do not have inevitable elder generation upon execution Afterwards sequentially.For example, in time point 10:00, time point 10 can be judged simultaneously:Whether 00 held with described The row time matches, while obtaining time point 10:The server state letter of each distributed server when 00 Breath.The present embodiment is not restricted to this.
Step 104, when current time was matched with the execution time, according to the server state Information selects the execution service matched with the pending task from the plurality of distributed server Device.
In the present embodiment, the ability of each distributed server is incomplete same.For example, server A Task A can be performed, and server B may not then perform task A.Again for example, server A Heavier in current time task, load is full, and server A B is then likely to be at idle condition.Again for example, Server A has the authority of execution task A, and server B does not then have the authority of execution task A. Accordingly, it would be desirable to comprehensive analysis is carried out to above-mentioned all kinds of server state informations, to determine one and institute Server that pending task most matches is stated as the execute server.
Step 160, will send to the selection for the execution information for indicating the execution pending task The execute server for matching so that the execute server according to the execution information perform described in treat Execution task.
In sum, the distributed timing task management method described in the present embodiment can current time with When the execution time matches, according to the server state information from the plurality of distributed server The middle execute server for selecting to match with the pending task;To be used for indicating that execution is described pending The execution information of task is sent to the execute server for matching of the selection, so that described perform service Device performs the pending task according to the execution information.It can be seen that, in the present embodiment, can basis The server state information of server dynamically selects server to go to perform the pending task, realizes Dynamically distributes and management to each server, pending task are not limited to what is fixed by only one Server realizing, that is, the load balancing of server is realized by the present embodiment, it is ensured that service The treatment effeciency of device.Simultaneously as pending task is performed in the server of matching, therefore further Improve the execution efficiency and the success rate for performing of pending task.
Embodiment two
On the basis of above-described embodiment one, the present embodiment also discloses the distributed timing after a kind of optimization Task management method.In the case of reconcilable, the distributed timing after optimization described in the present embodiment is appointed The feature of business management method can be with the distributed timing task management method described in the embodiment one Feature combine.In the present embodiment, can with but be not limited only to by distributed timing task management system System performs the distributed timing task management method after the optimization.
With reference to Fig. 2, a kind of step of distributed timing task management method in the embodiment of the present invention two is shown Rapid flow chart.In the present embodiment, the distributed timing task management method can include:
Step 202, receives the write of the pending task by first interface, it is determined that write information.
In the present embodiment, the pending task write by Web ends can be received by first interface. Preferably, the interactive interface for the pending task of user input (filling in) is provided with Web ends, use Family can be input into pending task to be performed by the interaction page (includes the execution of pending task The information such as time, task names, task type, tasks carrying authority).Web ends are receiving user After the information of input, the information of the user input can be sent to distributed fixed by first interface When task management system, i.e. distributed timing task management system receive described pending by first interface The write of task, it is determined that write information.As it was previously stated, during said write information can include following information At least one:The task names of the pending task, the execution time of the pending task, use In the execute instruction for performing the pending task.Wherein, the first interface include but are not limited to be: Gearman PAI (Application Programming Interface, application programming interface). Multiple pending tasks can be carried out queue process by Gearman PAI, carry out each successively pending The management of task.
Certainly, those skilled in the art are it should be apparent that distributed timing task management system not only It is limited to only to receive the write of the pending task from Web ends, for example, the pending task also may be used Directly to complete write, this reality by the user interface provided by the distributed timing task management system Apply example not to be restricted this.
Step 204, judges whether current time and the execution time of pending task match;And, Obtain the server state information of multiple distributed servers.
In the present embodiment, can with judge by the way of any one is appropriate current time with it is pending Whether the execution time of task matches.For example, optional mode can be as follows:Periodically read and treat The execution time of execution task, to be compared judgement with current time, read the execution time with work as Following step 206 is performed when the front time matches.Or, it is also possible to according to the execution of pending task Time is configured to the distributed timing task management system, determines configuration information, with when current Between perform following step 206 when meeting configuration information.
Those skilled in the art are it should be apparent that the acquisition modes of server state information can also be adopted Any one appropriate mode, for example, periodically obtains server state information, or, it is determined that When the execution time of current time and pending task matches, obtain under the current time it is described each The server state information of server.Wherein, specifically can be by the when server state information is obtained Two interfaces are obtaining.The second interface can with but be not limited only to be Cron API.
Preferably, the service status information includes at least one in following information:The first information, uses In the executable task of instruction server;Second information, for indicating the load condition of server;With, 3rd information, for indicating the execution authority of server.
In the present embodiment, the executable task that each server is subscribed to is incomplete same, for example, clothes Business device A have subscribed task A, then can perform task A;Non- subscription task A of server B, then not Task A can be performed.Wherein, the subscription that task is can perform in each server can be normal using task management Realize in script (Supervisor resides script).
Step 206, according to the server state information select from the plurality of distributed server with The execute server that the pending task matches.
As it was previously stated, the subscription of each distributed server can be considered when execute server is selected Situation.All kinds of factors such as loading condition and/or authority situation.Specifically:
According to the first information select from the plurality of distributed server one it is executable described in treat The server of execution task is used as the execute server;And/or,
From the plurality of distributed server, a load condition is selected to be less than according to second information The server of given threshold is used as the execute server;And/or,
According to the 3rd information select from the plurality of distributed server one have perform described in The server of pending task right is used as the execute server.
It should be noted that can be by the synthesis to the first information, the second information and the 3rd information Optimal execute server is determined in analysis.In the screening for carrying out execute server with multiple information as parameter When, the multiple results for being determined according to multiple information respectively can be sought common ground, by the friendship of each result Collection result is used as the execute server.
Step 208, will send to the selection for the execution information for indicating the execution pending task The execute server for matching so that the execute server according to the execution information perform described in treat Execution task.
In the present embodiment, the distribution of pending task can be carried out by any one appropriate mode, For example, timed task perform script can be passed through by execute server described in the execution information sending value. Wherein, the execution information includes:The task names of the pending task, for performing described treating The log information of the execute instruction of execution task and the pending task.
In sum, the distributed timing task management method described in the present embodiment can current time with When the execution time matches, according to the server state information from the plurality of distributed server The middle execute server for selecting to match with the pending task;To be used for indicating that execution is described pending The execution information of task is sent to the execute server for matching of the selection, so that described perform service Device performs the pending task according to the execution information.It can be seen that, in the present embodiment, can basis The server state information of server dynamically selects server to go to perform the pending task, realizes Dynamically distributes and management to each server, pending task are not limited to what is fixed by only one Server realizing, that is, the load balancing of server is realized by the present embodiment, it is ensured that service The treatment effeciency of device.Simultaneously as pending task is performed in the server of matching, therefore further Improve the execution efficiency and the success rate for performing of pending task.
Embodiment three
With reference to Fig. 3, in showing the embodiment of the present invention three, one kind is for realizing the distributed timing task The configuration diagram of the total management system of management method.In the present embodiment, the total management system Including:Web ends, distributed timing task management system and multiple distributed servers (Job server End).Wherein, at least include in the distributed timing task management system:Gearman PAI、Cron PAI and Supervisor resides script.Job server ends include:Server 1, server 2, Server N;Wherein, N is more than or equal to 1.Those skilled in the art are it should be apparent that the Cron PAI can realize by crontab_file that (crontab orders are common in Unix to the read-write operation to file Among the operating system of class Unix, for arranging the instruction being periodically performed, crontab_file is used The file specified substitutes current crontab).
Based on the framework of the total management system, the present embodiment is to the distributed timing task management side Method realizes that flow process is specifically described.
In the present embodiment, the distributed timing task management method realizes that flow process can specifically include Following steps:
Step S302, obtains the mission bit stream of the pending task at Web ends by Gearman PAI.
Step S304, determines the execution time match of current time and pending task.
Step S306, obtains the server state information of each distributed server by Cron PAI.
Step S308, selects from the plurality of distributed server according to the server state information The execute server matched with the pending task.
Step S310, will perform the pending task for instruction by the resident scripts of Supervisor Execution information is sent to the execute server.
It can be seen that, in the present embodiment, clothes can dynamically be selected according to the server state information of server Business device goes to perform the pending task, realizes the dynamically distributes to each server and management, waits to hold Row task is not limited to by the server of only one fixation realize, that is, passing through the present embodiment reality The load balancing of server is showed, it is ensured that the treatment effeciency of server.Simultaneously as pending task Perform in the server of matching, therefore further increase execution efficiency and the execution of pending task Success rate.
It should be noted that for aforesaid embodiment of the method, in order to be briefly described, therefore which is all stated For a series of combination of actions, but those skilled in the art should know, the present invention is by described Sequence of movement restriction because according to the present invention, some steps can using other order or while Carry out.Secondly, those skilled in the art should also know, embodiment described in this description is belonged to Preferred embodiment, involved action are not necessarily essential to the invention.
Example IV
Based on the same inventive concept of said method embodiment.The present embodiment also discloses a kind of distributed fixed When task management system.With reference to Fig. 4, a kind of distributed timing task in the embodiment of the present invention four is shown The structured flowchart of management system.In the present embodiment, the distributed timing task management system includes:
Judge module 402, for judging whether current time and the execution time of pending task match.
Acquisition module 404, for obtaining the server state information of multiple distributed servers.
Selecting module 406, for when current time was matched with the execution time, according to the clothes Business device status information selects to match with the pending task from the plurality of distributed server Execute server.
Task distribution module 408, for will send out for the execution information for indicating the execution pending task The execute server for matching of the selection is delivered to, so that the execute server performs letter according to described Breath performs the pending task.
In sum, the distributed timing task management system described in the present embodiment can current time with When the execution time matches, according to the server state information from the plurality of distributed server The middle execute server for selecting to match with the pending task;To be used for indicating that execution is described pending The execution information of task is sent to the execute server for matching of the selection, so that described perform service Device performs the pending task according to the execution information.It can be seen that, in the present embodiment, can basis The server state information of server dynamically selects server to go to perform the pending task, realizes Dynamically distributes and management to each server, pending task are not limited to what is fixed by only one Server realizing, that is, the load balancing of server is realized by the present embodiment, it is ensured that service The treatment effeciency of device.Simultaneously as pending task is performed in the server of matching, therefore further Improve the execution efficiency and the success rate for performing of pending task.
Embodiment five
With reference to Fig. 5, a kind of knot of distributed timing task management system in the embodiment of the present invention five is shown Structure block diagram.In the present embodiment, the distributed timing task management system includes:
Receiver module 502, for the write of the pending task is received by first interface, it is determined that writing Enter information.
In the present embodiment, said write information can include at least one in following information:It is described to treat The task names of execution task, the execution time of the pending task, for performing described pending The execute instruction of business.Wherein, the first interface can with but be not limited only to be Gearman PAI.
Judge module 504, for judging whether current time and the execution time of pending task match.
Acquisition module 506, for obtaining the server state information of multiple distributed servers.
In the present embodiment, the service status information includes at least one in following information:First letter Breath, for indicating the executable task of server;Second information, for indicating the load condition of server; With the 3rd information, for indicating the execution authority of server.Preferably, the acquisition module 506, Specifically can be used for obtaining the server state information of multiple distributed servers by second interface.It is described Second interface can with but be not limited only to be Cron API.
It should be noted that executable task is by using the resident script of task management in the server Subscribe to and determine.
Selecting module 508, for when current time was matched with the execution time, according to the clothes Business device status information selects to match with the pending task from the plurality of distributed server Execute server.
In the present embodiment, when it is determined that current time was matched with the execution time, the selection mould Block 508 is selecting to treat with described from the plurality of distributed server according to the server state information Can specifically include during the execute server that execution task matches:
According to the first information select from the plurality of distributed server one it is executable described in treat The server of execution task is used as the execute server;And/or,
From the plurality of distributed server, a load condition is selected to be less than according to second information The server of given threshold is used as the execute server;And/or,
According to the 3rd information select from the plurality of distributed server one have perform described in The server of pending task right is used as the execute server.
Task distribution module 510, for will send out for the execution information for indicating the execution pending task The execute server for matching of the selection is delivered to, so that the execute server performs letter according to described Breath performs the pending task.
In the present embodiment, the task distribution module 10, specifically can be used for performing by timed task Script is by execute server described in the execution information sending value.Wherein, the execution information includes: The task names of the pending task, the execute instruction for performing the pending task and described treat The log information of execution task.
In sum, the distributed timing task management system described in the present embodiment can current time with When the execution time matches, according to the server state information from the plurality of distributed server The middle execute server for selecting to match with the pending task;To be used for indicating that execution is described pending The execution information of task is sent to the execute server for matching of the selection, so that described perform service Device performs the pending task according to the execution information.It can be seen that, in the present embodiment, can basis The server state information of server dynamically selects server to go to perform the pending task, realizes Dynamically distributes and management to each server, pending task are not limited to what is fixed by only one Server realizing, that is, the load balancing of server is realized by the present embodiment, it is ensured that service The treatment effeciency of device.Simultaneously as pending task is performed in the server of matching, therefore further Improve the execution efficiency and the success rate for performing of pending task.
For said apparatus embodiment, due to itself and embodiment of the method basic simlarity, so description Fairly simple, related part is illustrated referring to the part of embodiment of the method.
Provided herein algorithm and show not with any certain computer, virtual system or miscellaneous equipment It is intrinsic related.Various general-purpose systems can also be used together based on teaching in this.According to above Description, the structure constructed required by this kind of system is obvious.Additionally, the present invention is also not for Any certain programmed language.It is understood that, it is possible to use various programming languages realize described here The content of invention, and the description done to language-specific above is for the optimal reality for disclosing the present invention Apply mode.
In description mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that Embodiments of the invention can be put into practice in the case where not having these details.In some instances, Known method, structure and technology are not been shown in detail, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand in each inventive aspect It is individual or multiple, in above to the description of the exemplary embodiment of the present invention, each feature of the invention Sometimes it is grouped together in single embodiment, figure or descriptions thereof.However, should be by The method of the disclosure is construed to reflect following intention:I.e. the present invention for required protection requires ratio at each The more features of feature being expressly recited in claim.More precisely, as following right will As asking book reflected, inventive aspect is less than all spies of single embodiment disclosed above Levy.Therefore, it then follows thus claims of specific embodiment are expressly incorporated in the specific embodiment party Separate embodiments of the formula, wherein each claim as the present invention itself.
Those skilled in the art are appreciated that can be carried out to the module in the equipment in embodiment Adaptively change and they are arranged in one or more different from embodiment equipment. Module or unit or component in embodiment can be combined into a module or unit or component, and In addition multiple submodule or subelement or sub-component can be divided into.Except such feature and/or Outside at least some in process or unit is excluded each other, can be using any combinations to this explanation All features disclosed in book (including adjoint claim, summary and accompanying drawing) and so disclosed All processes or unit of any method or equipment are combined.Unless expressly stated otherwise, this theory Each feature disclosed in bright book (including adjoint claim, summary and accompanying drawing) can be by offer phase With the alternative features of, equivalent or similar purpose replacing.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include Some included features rather than further feature in other embodiments, but the feature of different embodiments Combination mean to be within the scope of the present invention and formed different embodiments.For example, under In the claims in face, embodiment required for protection one of arbitrarily can be in any combination Mode is using.
The all parts embodiment of the present invention can be realized with hardware, or with one or more The software module run on reason device is realized, or is realized with combinations thereof.Those skilled in the art It should be appreciated that can be realized using microprocessor or digital signal processor (DSP) in practice Some or all parts in a kind of distributed timing task management equipment according to embodiments of the present invention Some or all functions.The present invention is also implemented as performing method as described herein (for example, computer program and computer program are produced for some or all equipment or program of device Product).Such program for realizing the present invention can be stored on a computer-readable medium, or can have There is the form of one or more signal.Such signal can be downloaded from internet website and be obtained, Or provide on carrier signal, or provided with any other form.
It should be noted that above-described embodiment the present invention will be described rather than the present invention is limited Make, and those skilled in the art can design without departing from the scope of the appended claims Alternative embodiment.In the claims, any reference markss between bracket should not be configured to Limitations on claims.Word "comprising" do not exclude the presence of element not listed in the claims or Step.Word "a" or "an" before element does not exclude the presence of multiple such units Part.The present invention can be by means of the hardware for including some different elements and by means of properly programmed Computer is realizing.If in the unit claim for listing equipment for drying, some in these devices Individual can be embodying by same hardware branch.Word first, second, and third Using not indicating that any order.These words can be construed to title.
The invention discloses A1, a kind of distributed timing task management method, including:
Judge whether current time and the execution time of pending task match;And, obtain multiple points The server state information of cloth server;
When current time was matched with the execution time, according to the server state information from described The execute server matched with the pending task is selected in multiple distributed servers;
Matching to the selection will be sent for the execution information for indicating the execution pending task Execute server so that the execute server according to the execution information perform it is described pending Business.
A2, the method as described in A1, also include:
The write of the pending task is received by first interface, it is determined that write information;Wherein, it is described Write information includes at least one in following information:The task names of the pending task, described treat The execution time of execution task, the execute instruction for performing the pending task.
A3, the method as described in A2, the first interface are Gearman PAI.
A4, the method as described in A1, the service status information include at least one in following information: The first information, for indicating the executable task of server;Second information, for indicating the negative of server Load state;With the 3rd information, for indicating the execution authority of server.
A5, the method as described in A4, according to the server state information from the plurality of distributed clothes The execute server matched with the pending task is selected in business device, including:
According to the first information select from the plurality of distributed server one it is executable described in treat The server of execution task is used as the execute server;And/or,
From the plurality of distributed server, a load condition is selected to be less than according to second information The server of given threshold is used as the execute server;And/or,
According to the 3rd information select from the plurality of distributed server one have perform described in The server of pending task right is used as the execute server.
A6, the method as described in A4, in the server, executable task is by adopting task management Resident script is subscribed to and is determined.
A7, the method as described in A1, obtain the server of multiple distributed servers by second interface Status information.
A8, the method as described in A7, the second interface are Cron API.
A9, the method as described in A1, will send out for the execution information for indicating the execution pending task The execute server for matching of the selection is delivered to, including:
By timed task perform script by execute server described in the execution information sending value;Wherein, The execution information includes:The task names of the pending task, for performing described pending The log information of the execute instruction of business and the pending task.
The invention also discloses B10, a kind of distributed timing task management system, including:
Judge module, for judging whether current time and the execution time of pending task match;
Acquisition module, for obtaining the server state information of multiple distributed servers;
Selecting module, for when current time was matched with the execution time, according to the server Status information selects the execution matched with the pending task from the plurality of distributed server Server;
Task distribution module, for will be used for indicating the execution information for performing the pending task send to The execute server for matching of the selection, so that the execute server is held according to the execution information The row pending task.
B11, the system as described in B10, also include:
Receiver module, for the write of the pending task is received by first interface, it is determined that write letter Breath;Wherein, said write information includes at least one in following information:The pending task appoint Business title, the execution time of the pending task, the execute instruction for performing the pending task.
B12, the system as described in B11, the first interface are Gearman PAI.
B13, the system as described in B10, the service status information include in following information at least one Kind:The first information, for indicating the executable task of server;Second information, for indicating server Load condition;With the 3rd information, for indicating the execution authority of server.
B14, the system as described in B13, the selecting module according to the server state information from When the execute server matched with the pending task is selected in the plurality of distributed server, bag Include:
According to the first information select from the plurality of distributed server one it is executable described in treat The server of execution task is used as the execute server;And/or,
From the plurality of distributed server, a load condition is selected to be less than according to second information The server of given threshold is used as the execute server;And/or,
According to the 3rd information select from the plurality of distributed server one have perform described in The server of pending task right is used as the execute server.
B15, the system as described in B13, in the server, executable task is by using task pipe The resident script of reason is subscribed to and is determined.
B16, the system as described in B10, the acquisition module, for obtaining multiple by second interface The server state information of distributed server.
B17, the system as described in B16, the second interface are Cron API.
B18, the system as described in B10, task distribution module, for by timed task perform script By execute server described in the execution information sending value;Wherein, the execution information includes:It is described The task names of pending task, the execute instruction for performing the pending task and described pending The log information of task.

Claims (10)

1. a kind of distributed timing task management method, including:
Judge whether current time and the execution time of pending task match;And, obtain multiple points The server state information of cloth server;
When current time was matched with the execution time, according to the server state information from described The execute server matched with the pending task is selected in multiple distributed servers;
Matching to the selection will be sent for the execution information for indicating the execution pending task Execute server so that the execute server according to the execution information perform it is described pending Business.
2. the method for claim 1, it is characterised in that also include:
The write of the pending task is received by first interface, it is determined that write information;Wherein, it is described Write information includes at least one in following information:The task names of the pending task, described treat The execution time of execution task, the execute instruction for performing the pending task.
3. method as claimed in claim 2, it is characterised in that the first interface is Gearman PAI。
4. the method for claim 1, it is characterised in that the service status information include as At least one in lower information:The first information, for indicating the executable task of server;Second information, For indicating the load condition of server;With the 3rd information, for indicating the execution authority of server.
5. method as claimed in claim 4, it is characterised in that according to the server state information The execute server matched with the pending task is selected from the plurality of distributed server, is wrapped Include:
According to the first information select from the plurality of distributed server one it is executable described in treat The server of execution task is used as the execute server;And/or,
From the plurality of distributed server, a load condition is selected to be less than according to second information The server of given threshold is used as the execute server;And/or,
According to the 3rd information select from the plurality of distributed server one have perform described in The server of pending task right is used as the execute server.
6. method as claimed in claim 4, it is characterised in that executable in the server Business is determined by being subscribed to using the resident script of task management.
7. the method for claim 1, it is characterised in that obtain multiple points by second interface The server state information of cloth server.
8. method as claimed in claim 7, it is characterised in that the second interface is Cron API.
9. the method for claim 1, it is characterised in that wait to hold described in being used for indicating performing The execution information of row task is sent to the execute server for matching of the selection, including:
By timed task perform script by execute server described in the execution information sending value;Wherein, The execution information includes:The task names of the pending task, for performing described pending The log information of the execute instruction of business and the pending task.
10. a kind of distributed timing task management system, including:
Judge module, for judging whether current time and the execution time of pending task match;
Acquisition module, for obtaining the server state information of multiple distributed servers;
Selecting module, for when current time was matched with the execution time, according to the server Status information selects the execution matched with the pending task from the plurality of distributed server Server;
Task distribution module, for will be used for indicating the execution information for performing the pending task send to The execute server for matching of the selection, so that the execute server is held according to the execution information The row pending task.
CN201510645550.3A 2015-10-08 2015-10-08 Distributed timing task management method and system Pending CN106569878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510645550.3A CN106569878A (en) 2015-10-08 2015-10-08 Distributed timing task management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510645550.3A CN106569878A (en) 2015-10-08 2015-10-08 Distributed timing task management method and system

Publications (1)

Publication Number Publication Date
CN106569878A true CN106569878A (en) 2017-04-19

Family

ID=58507127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510645550.3A Pending CN106569878A (en) 2015-10-08 2015-10-08 Distributed timing task management method and system

Country Status (1)

Country Link
CN (1) CN106569878A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273194A (en) * 2017-05-23 2017-10-20 北京小度信息科技有限公司 Task executing method and terminal device
CN108984290A (en) * 2018-08-02 2018-12-11 北京京东金融科技控股有限公司 Method for scheduling task and system
CN109614239A (en) * 2018-12-12 2019-04-12 浪潮(北京)电子信息产业有限公司 System cluster load-balancing method, device and relevant device
CN109656693A (en) * 2018-10-25 2019-04-19 中国平安人寿保险股份有限公司 Method for scheduling task, device, server and storage medium
CN109739192A (en) * 2018-12-29 2019-05-10 广州远联物流服务有限公司 Control method and system under a kind of intelligent logistics system
CN109766167A (en) * 2017-11-09 2019-05-17 阿里巴巴集团控股有限公司 Method, apparatus, system and the equipment of timed task distribution
CN109766201A (en) * 2019-01-04 2019-05-17 中国联合网络通信集团有限公司 Task distribution method, server, client and system
CN110069329A (en) * 2019-04-15 2019-07-30 北京达佳互联信息技术有限公司 A kind of task processing method, device, server and storage medium
CN112347096A (en) * 2019-08-09 2021-02-09 上海晶赞融宣科技有限公司 Event distribution method and device, storage medium and terminal

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140528A (en) * 2007-08-31 2008-03-12 中兴通讯股份有限公司 Method, device and system for realizing timing tasks load equilibria in cluster
CN101533417A (en) * 2009-04-28 2009-09-16 阿里巴巴集团控股有限公司 A method and system for realizing ETL scheduling
CN102521044A (en) * 2011-12-30 2012-06-27 北京拓明科技有限公司 Distributed task scheduling method and system based on messaging middleware
US20140026144A1 (en) * 2012-07-23 2014-01-23 Brandon John Pack Systems And Methods For Load Balancing Of Time-Based Tasks In A Distributed Computing System
CN103677973A (en) * 2013-09-01 2014-03-26 西安重装渭南光电科技有限公司 Distributed multi-task scheduling management system
CN103761128A (en) * 2014-01-10 2014-04-30 北京奇虎科技有限公司 Instruction execution method, instruction execution device and instruction execution system
CN103793272A (en) * 2013-12-27 2014-05-14 北京天融信软件有限公司 Periodical task scheduling method and periodical task scheduling system
CN104408106A (en) * 2014-11-20 2015-03-11 浙江大学 Scheduling method for big data inquiry in distributed file system
CN104468174A (en) * 2013-09-25 2015-03-25 北京新媒传信科技有限公司 Method and device for cluster servers to execute task

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140528A (en) * 2007-08-31 2008-03-12 中兴通讯股份有限公司 Method, device and system for realizing timing tasks load equilibria in cluster
CN101533417A (en) * 2009-04-28 2009-09-16 阿里巴巴集团控股有限公司 A method and system for realizing ETL scheduling
CN102521044A (en) * 2011-12-30 2012-06-27 北京拓明科技有限公司 Distributed task scheduling method and system based on messaging middleware
US20140026144A1 (en) * 2012-07-23 2014-01-23 Brandon John Pack Systems And Methods For Load Balancing Of Time-Based Tasks In A Distributed Computing System
CN103677973A (en) * 2013-09-01 2014-03-26 西安重装渭南光电科技有限公司 Distributed multi-task scheduling management system
CN104468174A (en) * 2013-09-25 2015-03-25 北京新媒传信科技有限公司 Method and device for cluster servers to execute task
CN103793272A (en) * 2013-12-27 2014-05-14 北京天融信软件有限公司 Periodical task scheduling method and periodical task scheduling system
CN103761128A (en) * 2014-01-10 2014-04-30 北京奇虎科技有限公司 Instruction execution method, instruction execution device and instruction execution system
CN104408106A (en) * 2014-11-20 2015-03-11 浙江大学 Scheduling method for big data inquiry in distributed file system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273194A (en) * 2017-05-23 2017-10-20 北京小度信息科技有限公司 Task executing method and terminal device
CN109766167A (en) * 2017-11-09 2019-05-17 阿里巴巴集团控股有限公司 Method, apparatus, system and the equipment of timed task distribution
CN109766167B (en) * 2017-11-09 2023-03-21 阿里巴巴集团控股有限公司 Method, device, system and equipment for distributing timed tasks
CN108984290A (en) * 2018-08-02 2018-12-11 北京京东金融科技控股有限公司 Method for scheduling task and system
CN108984290B (en) * 2018-08-02 2021-03-30 北京京东金融科技控股有限公司 Task scheduling method and system
CN109656693A (en) * 2018-10-25 2019-04-19 中国平安人寿保险股份有限公司 Method for scheduling task, device, server and storage medium
CN109614239A (en) * 2018-12-12 2019-04-12 浪潮(北京)电子信息产业有限公司 System cluster load-balancing method, device and relevant device
CN109739192A (en) * 2018-12-29 2019-05-10 广州远联物流服务有限公司 Control method and system under a kind of intelligent logistics system
CN109739192B (en) * 2018-12-29 2020-06-16 广州远联物流服务有限公司 Control method and system under intelligent logistics system
CN109766201A (en) * 2019-01-04 2019-05-17 中国联合网络通信集团有限公司 Task distribution method, server, client and system
CN110069329A (en) * 2019-04-15 2019-07-30 北京达佳互联信息技术有限公司 A kind of task processing method, device, server and storage medium
CN112347096A (en) * 2019-08-09 2021-02-09 上海晶赞融宣科技有限公司 Event distribution method and device, storage medium and terminal

Similar Documents

Publication Publication Date Title
CN106569878A (en) Distributed timing task management method and system
CN105389191B (en) A kind of method for upgrading software based on LAN, device and system
US8707275B2 (en) Simulation environment for distributed programs
CN106529682A (en) Method and apparatus for processing deep learning task in big-data cluster
JP2020531975A (en) A device that provides a set of cryptographically protected, filtered, and sorted transaction datasets for blockchain links.
CN103207785B (en) The processing method of data download request, Apparatus and system
CN108762911A (en) Timing task management method, apparatus, computer equipment and storage medium
US7865550B2 (en) Message processing control in a publish/subscribe system
CN113220431B (en) Cross-cloud distributed data task scheduling method, device and storage medium
CN107203424A (en) A kind of method and apparatus that deep learning operation is dispatched in distributed type assemblies
CN105530297B (en) A kind of web page resources wrap transmission method and device
CN105975844B (en) A kind of login method and device
US10942715B2 (en) Composable context menus
CN107797834A (en) Page generation method, device and the equipment of logistical applications
CN110262933B (en) Test method, test device, and storage medium
CN105607944B (en) A kind of method and device of sharing application environment
CA2845174A1 (en) Interactive survey system
Scholl et al. Cloud native: using containers, functions, and data to build next-generation applications
CN109445797A (en) Handle task executing method and device
CN108153891A (en) Active time statistical method of surfing the Internet and device
Papadimitriou et al. End-to-end online performance data capture and analysis for scientific workflows
CN109240802A (en) request processing method and device
CN103248627B (en) Method, forward proxy server and system for visiting website resources
CN110213333B (en) Task processing method and device, electronic equipment and computer readable medium
CN104394095B (en) Data transmission method, system and source server

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

Application publication date: 20170419

RJ01 Rejection of invention patent application after publication