[go: up one dir, main page]

CN108762931A - Method for scheduling task, server based on distributed scheduling system and storage medium - Google Patents

Method for scheduling task, server based on distributed scheduling system and storage medium Download PDF

Info

Publication number
CN108762931A
CN108762931A CN201810546967.8A CN201810546967A CN108762931A CN 108762931 A CN108762931 A CN 108762931A CN 201810546967 A CN201810546967 A CN 201810546967A CN 108762931 A CN108762931 A CN 108762931A
Authority
CN
China
Prior art keywords
task
timed task
timed
scheduling
host
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.)
Withdrawn
Application number
CN201810546967.8A
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.)
Kang Keyi Information Technology (shenzhen) Co Ltd
Original Assignee
Kang Keyi Information Technology (shenzhen) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kang Keyi Information Technology (shenzhen) Co Ltd filed Critical Kang Keyi Information Technology (shenzhen) Co Ltd
Priority to CN201810546967.8A priority Critical patent/CN108762931A/en
Publication of CN108762931A publication Critical patent/CN108762931A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5017Task decomposition

Landscapes

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

Abstract

The present invention provides a kind of method for scheduling task, device and storage medium based on distributed scheduling system, this method receive large batch of task scheduling request, create timed task according to request batch, the relevant information of each task is stored to message queue.Later, this method receives the task in message queue, executes each mission dispatching to corresponding host by preset mode, and monitor the execution state of each task in real time.If certain task execution fails, then restart regular automatic trigger by preset task and execute the host of the task and executes the task again, if triggering executes failure again, then load-balancing device is written after execution device-identification information in the task task being forwarded to other hosts execution, until task execution success, which is stored in the form of daily record to database.Using the present invention, the scheduling of high-volume distributed scheduling task can be realized, promote the handling capacity of distributed system.

Description

Method for scheduling task, server based on distributed scheduling system and storage medium
Technical field
The present invention relates to field of computer technology more particularly to a kind of task scheduling sides based on distributed scheduling system Method, server and computer readable storage medium.
Background technology
In internet, cloud computing, big data epoch, the characteristics of there are big data, high concurrents in terms of the processing of task.Distribution Formula task scheduling system avoids data from being repeatedly processed through vaporization, condensation and absorption primarily to when coordinating multinode processing same task.Pass through collection The node of group shares the processing of high-volume task, improves the treatment effeciency of batch tasks.
Existing distributed scheduling system is to execute the node of task based on database realizing task scheduling in system to appoint The relevant information of business is written database one by one, the scheduler of each node be in compliance with one based on the operation rules of Database lock with Ensure the uniqueness of operation, but this scheduling strategy has some limitations:Task of the cluster features for high CPU usage Effect is fine, but for a large amount of short task, each node can all seize Database lock, occur as soon as a large amount of thread etc. in this way Wait for resource.And such case can be increasingly severe with the increase of node.
Invention content
In view of the foregoing, the present invention provide a kind of method for scheduling task based on distributed scheduling system, server and Computer readable storage medium, main purpose are rational management task, improve task scheduling reliability, promote distributed adjust The handling capacity of degree system.
To achieve the above object, the present invention provides a kind of method for scheduling task based on distributed scheduling system, this method Including:
Foundation step:Large batch of task scheduling request is received, asks batch to create timed task according to task scheduling, it will The relevant information of each timed task is stored in a manner of message to message queue;
Monitoring step:The timed task in message queue is received, is issued to each timed task accordingly by preset mode Host execute, and monitor the execution state of each timed task in real time;
Execute step:If certain timed task executes failure, restarting regular automatic trigger by preset task, to execute this fixed When task host execute the timed task again, if by preset task restart rule again triggering execute the timed task still Status of fail is so returned to, then load-balancing device be written after execution device-identification information in the timed task by the timed task It is forwarded to other hosts to execute, until the timed task runs succeeded, which is stored in the form of daily record To database.
Preferably, the preset task restarts rule and includes:
The threshold value for restarting number is set, this is executed every preset time triggering within the effective time of the timed task Business, until the timed task is successful or reaches the threshold value for restarting number.
Preferably, the preset mode includes:
According to the quantity of available host, timed task or task groups are evenly distributed to each host and executed, or according to Timed task quantity and host number are distributed to each host by way of modulus remainder and are executed, or by timed task distribute to One or more minimum host of present load executes.
Preferably, the foundation step includes:
The timed task of establishment is subjected to division task groups according to preset division rule, task in each task groups is set Period in triggered time or execute the time.
Preferably, the execution device-identification information executes the host address of the timed task, executes failure before including Time, restart number and execute failure the reason of.
Preferably, this method further includes step:If reaching effective time or restarting the threshold value of number, which does not hold It goes successfully or finishes, then feed back the result for executing failure to load-balancing device.
In addition, the present invention also provides a kind of server, which includes:Memory, processor and display, it is described to deposit Store tasks scheduler program on reservoir, the task dispatch are executed by the processor, it can be achieved that following steps:
Foundation step:Large batch of task scheduling request is received, asks batch to create timed task according to task scheduling, it will The relevant information of each timed task is stored in a manner of message to message queue;
Monitoring step:The timed task in message queue is received, is issued to each timed task accordingly by preset mode Host execute, and monitor the execution state of each timed task in real time;
Execute step:If certain timed task executes failure, restarting regular automatic trigger by preset task, to execute this fixed When task host execute the timed task again, if by preset task restart rule again triggering execute the timed task still Status of fail is so returned to, then load-balancing device be written after execution device-identification information in the timed task by the timed task It is forwarded to other hosts to execute, until the timed task runs succeeded, which is stored in the form of daily record To database.
Preferably, the preset task restarts rule and includes:
The threshold value for restarting number is set, this is executed every preset time triggering within the effective time of the timed task Business, until the timed task is successful or reaches the threshold value for restarting number.
Preferably, the preset mode includes:
According to the quantity of available host, timed task or task groups are evenly distributed to each host and executed, or according to Timed task quantity and host number are distributed to each host by way of modulus remainder and are executed, or by timed task distribute to One or more minimum host of present load executes.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium Storage medium includes task dispatch, it can be achieved that being based on as described above when the task dispatch is executed by processor Arbitrary steps in the method for scheduling task of distributed scheduling system.
Method for scheduling task, server and computer-readable storage medium proposed by the present invention based on distributed scheduling system Matter, is asked by receiving large batch of task scheduling, is asked batch to create timed task according to task scheduling, each will periodically be appointed The relevant information of business is stored in a manner of message to message queue.Later, the timed task in message queue is received, by preset Each timed task is issued to corresponding host and executed by mode, and monitors the execution state of each timed task in real time.If certain timing Task execution fails, then restarts regular automatic trigger by preset task and execute the host of the timed task and execute the timing again Task, if restarting rule by preset task, the triggering execution timed task still returns to status of fail, load balancing again Equipment is written after execution device-identification information in the timed task timed task being forwarded to other hosts execution, until should Timed task runs succeeded, which is stored in the form of daily record to database, is executed to make full use of The host of timed task greatly improves the processing capacity of timed task.
Description of the drawings
Fig. 1 is that the present invention is based on the application environment schematic diagrames of the method for scheduling task of distributed scheduling system;
Fig. 2 is the schematic diagram of server preferred embodiment of the present invention;
Fig. 3 is the module diagram of task dispatch preferred embodiment in Fig. 2;
Fig. 4 is that the present invention is based on the flow charts of the method for scheduling task preferred embodiment of distributed scheduling system;
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
As shown in Figure 1, being the application environment schematic diagram of the method for scheduling task the present invention is based on distributed scheduling system.
In the present embodiment, the present invention provides a kind of distributed scheduling system, which includes scheduling engine, load balancing Equipment, console and database.Wherein, the scheduling engine is used to create timing according to the task requests batch of reception and appoint Business, and task scheduling is triggered, it can be also used for the management operation such as modification, deletion, pause and recovery of execution task.The load Equalizing equipment is used to the timed task obtained from message queue being issued to host by preset mode, can be also used in real time The execution state of all timed tasks is monitored, and records the data generated in each timed task implementation procedure, is stored to data Library.Generated data in current execution state and implementation procedure of the console for inquiring each task, including the execution time, The reason of task execution success number, task execution failure number and each task execution fail etc..
As shown in Fig. 2, being the schematic diagram of 1 preferred embodiment of server of the present invention.
In the present embodiment, server 1 refers to service of goods platform, the server 1 can be server, tablet computer, PC, pocket computer and other electronic equipments with calculation function.
The server 1 includes:Memory 11, processor 12, display 13, network interface 14 and communication bus 15.Wherein, Network interface 14 may include optionally standard wireline interface and wireless interface (such as WI-FI interface).Communication bus 15 is for real Connection communication between these existing components.
Memory 11 includes at least a type of readable storage medium storing program for executing.The readable storage medium storing program for executing of at least one type It can be the non-volatile memory medium of such as flash memory, hard disk, multimedia card, card-type memory.In some embodiments, described to deposit Reservoir 11 can be the internal storage unit of the server 1, such as the hard disk of the server 1.In further embodiments, institute State the external memory unit that memory 11 can also be the server 1, such as the plug-in type being equipped on the server 1 is hard Disk, intelligent memory card (SmartMedia Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..In the present embodiment, the memory 11 can be not only used for the application software that storage is installed on the server 1 And Various types of data, such as task dispatch 10 and timed task etc..
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chips, the program code for being stored in run memory 11 or processing data, example It such as executes the computer program code of task dispatch 10, execute modification, deletion, pause and the recovery of task.
Display 13 is properly termed as display screen or display unit.Display 13 can be that LED is shown in some embodiments Device, liquid crystal display, touch-control liquid crystal display and Organic Light Emitting Diode (OrganicLight-Emitting Diode, OLED device etc.) is touched.Display 13 is for showing the information handled in the server 1 and for showing visual work circle Face, such as show the current execution state of each task.
Fig. 2 illustrates only the server 1 with component 11-15 and task dispatch 10, it should be understood that simultaneously All components shown realistic are not applied, the implementation that can be substituted is more or less component.
Optionally, which can also include user interface, and user interface may include input unit such as keyboard (Keyboard), instantaneous speech power such as sound equipment, earphone etc., optionally user interface can also be connect including the wired of standard Mouth, wireless interface.
Optionally, which further includes touch sensor.What the touch sensor was provided touches for user The region of operation is known as touch area.In addition, touch sensor described here can be resistive touch sensor, condenser type Touch sensor etc..Moreover, the touch sensor not only includes the touch sensor of contact, touching for proximity may also comprise Touch sensor etc..In addition, the touch sensor can be single sensor, or such as multiple sensings of array arrangement Device.User can start task dispatch 10 by touching the touch area.
In addition, the area of the display of the electronic device 1 can be identical as the area of the touch sensor, it can not also Together.Optionally, display and touch sensor stacking are arranged, to form touch display screen.The device is based on touching aobvious Display screen detects the touch control operation of user's triggering.
The server 1 can also include radio frequency (Radio Frequency, RF) circuit, sensor and voicefrequency circuit etc., Details are not described herein.
In 1 embodiment of server shown in Fig. 2, as store tasks in a kind of memory 11 of computer storage media The program code of scheduler program 10 when processor 12 executes the program code of task dispatch 10, realizes following steps:
Foundation step:Large batch of task scheduling request is received, asks batch to create timed task according to task scheduling, it will The relevant information of each timed task is stored in a manner of message to message queue;
Monitoring step:The timed task in message queue is received, is issued to each timed task accordingly by preset mode Host execute, and monitor the execution state of each timed task in real time;
Execute step:If certain timed task executes failure, restarting regular automatic trigger by preset task, to execute this fixed When task host execute the timed task again, if by preset task restart rule again triggering execute the timed task still Status of fail is so returned to, then load-balancing device be written after execution device-identification information in the timed task by the timed task It is forwarded to other hosts to execute, until the timed task runs succeeded, which is stored in the form of daily record To database.
Concrete principle please refers to following Fig. 3 and is closed about the module diagram and Fig. 4 of 10 preferred embodiment of task dispatch In the introduction of the flow chart of the method for scheduling task preferred embodiment based on distributed scheduling system.
As shown in figure 3, being the module diagram of 10 preferred embodiment of task dispatch in Fig. 2.The so-called mould of the present invention Block is the series of computation machine program instruction section for referring to complete specific function.
In the present embodiment, task dispatch 10 includes:Creation module 110, monitoring module 120 and execution module 130, In conjunction with the application environment schematic diagram of Fig. 3 Program modules, steps are as follows for the functions or operations that the module 110-130 is realized:
Creation module 110 asks batch to create timing for receiving large batch of task scheduling request according to task scheduling Task stores the relevant information of each timed task in a manner of message to message queue.Wherein, the establishment timed task Including the timed task of establishment is carried out division task groups according to preset division rule, touching for task in each task groups is set It sends out the time cycle or executes the time.The preset division rule refers to carrying out task according to requesting party, task function or type Grouping divide.For example, the identical task of requesting party is divided into the same task groups, or by identical of function or type Business is divided into the same task groups.The period in triggered time of task or execution time in the task groups, can be with task groups Unit carries out batch setting, task can also be configured one by one.The relevant information includes the requestor information of initiation task (such as Supplicant Address) and task definition (for example, mission requirements order does not complete in 2 hours is just automatically closed order) etc..Into One step, after timed task establishment, update that can also according to requesting party to scheduler task executes modification, deletion, suspends And recovery tasks etc. manage operation.
Monitoring module 120 is issued each timed task by preset mode for receiving the timed task in message queue It is executed to corresponding host, and monitors the execution state of each timed task in real time.Timed task in the reception message queue Can be obtained from message queue as unit of task groups, can also be to be obtained from message queue as unit of individual task.Together Reason, when task is issued to corresponding host, can also be assigned to corresponding host, or individually to appoint as unit of task groups Business is that unit is assigned to corresponding host.During monitoring all timed task execution states, the also each timing of record is appointed The data generated in business implementation procedure, and store to database.User can access database or load balancing by console Generated data in the current execution state and implementation procedure of each task of equipment query.The data of the generation include executing The reason of time, task execution success number, task execution failure number and each task execution fail etc..The user can be with Refer to requesting party, system manager can also be referred to.Wherein, the preset mode includes:It, will timing according to the quantity of available host Task or task groups are evenly distributed to each host and are executed, or pass through modulus remainder according to timed task quantity and host number Distributed by way of (for example, passing through MOD remainders) to each host execute, or by timed task distribute to present load it is minimum one Platform or multiple host execute.For example, available host number is 15, timed task is 300,000, by 300,000 timed task It evenly distributes to each host and executes.
Execution module 130 is restarted regular automatic trigger by preset task and is held if executing failure for certain timed task The host of the row timed task executes the timed task again, if restarting rule by preset task, triggering executes the timing again Task still returns to status of fail, then load-balancing device determines this after execution device-identification information is written in the timed task When task be forwarded to other hosts and execute, until the timed task runs succeeded, by the timed task implementing result with daily record shape Formula is stored to database.Preset task restarts rule:The threshold value for restarting number is set, the timed task it is effective when Interior triggered every preset time executes the task, until the timed task is successful or reaches the threshold value for restarting number.For example, setting Set that restart the threshold value of number be 3, preset time is 5 minutes, and effective time of the task is 2 hours, then in 2 hours, when this When task execution fails, every 5 minutes, triggering executed the task again, restarts number and adds 1, until task execution success or restarted Number reaches 3 times.If reaching effective time or restarting the threshold value of number, which is not carried out successfully or finishes, then feed back The result of failure is executed to load-balancing device.The effective time of timed task since executing the timed task for the first time fall Timing.Described execute executes the host address of the timed task, the time for executing failure, restarts before device-identification information includes The reason of number and execution failure.
As shown in figure 4, being the flow chart of the method for scheduling task preferred embodiment the present invention is based on distributed scheduling system.
In the present embodiment, when processor 12 executes the computer program of the task dispatch 10 stored in memory 11 Realize that the method for scheduling task based on distributed scheduling system includes:Step S10- steps S30:
Step S10, creation module 110 receive large batch of task scheduling request, ask batch to create according to task scheduling Timed task stores the relevant information of each timed task in a manner of message to message queue.Wherein, the establishment timing Task includes that the timed task of establishment is carried out division task groups according to preset division rule, and task in each task groups is arranged Period in triggered time or execute the time.The preset division rule refers to being carried out according to requesting party, task function or type The grouping of task divides.For example, the identical task of requesting party is divided into the same task groups, or function or type is identical Task be divided into the same task groups.It the period in triggered time of task or execution time in the task groups, can be with task Group is that unit carries out batch setting, task can also be configured one by one.The relevant information includes the requesting party of initiation task Information (such as Supplicant Address) and task definition (for example, mission requirements order does not complete in 2 hours is just automatically closed order) Deng.Further, after timed task establishment, update that can also be according to requesting party to scheduler task executes modification, deletes It removes, suspend and the management operation such as recovery tasks.
Step S20, monitoring module 120 receive the timed task in message queue, by preset mode by each timed task It is issued to corresponding host to execute, and monitors the execution state of each timed task in real time.Timing in the reception message queue Task can be obtained from message queue as unit of task groups, can also be to be obtained from message queue as unit of individual task It takes.Similarly, when task is issued to corresponding host, corresponding host can also be assigned to as unit of task groups, or with Individual task is that unit is assigned to corresponding host.During monitoring all timed task execution states, also record is each The data generated in timed task implementation procedure, and store to database.User can access database or negative by console Carry equalizing equipment inquire each task current execution state and implementation procedure in generated data.The data packet of the generation It includes and executes the reason of time, task execution success number, task execution failure number and each task execution fail etc..The use Family can refer to requesting party, can also refer to system manager.Wherein, the preset mode includes:According to the quantity of available host, By timed task or task groups evenly distribute to each host execute, or according to timed task quantity with host number by taking It is distributed by way of mould remainder (for example, passing through MOD remainders) to each host and is executed, or timed task is distributed to present load most One or more low host executes.For example, available host number is 15, timed task is 300,000,300,000 are determined When task evenly distribute to each host execute.
Step S30, if certain timed task executes failure, execution module 130 is restarted regular automatic tactile by preset task The host that hair executes the timed task executes the timed task again, if restarting rule by preset task, triggering execution should again Timed task still returns to status of fail, then execution state is written in 130 load-balancing device of execution module in the timed task The timed task is forwarded to other hosts after identification information to execute, until the timed task runs succeeded, by the timed task Implementing result is stored in the form of daily record to database.Preset task restarts rule:The threshold value for restarting number is set, at this It is triggered every preset time in effective time of timed task and executes the task, until timed task success or reach is restarted time Several threshold values.For example, the threshold value that number is restarted in setting is 3, preset time is 5 minutes, and the effective time of the task is 2 hours, Then in 2 hours, when the task execution fails, every 5 minutes, triggering executed the task again, restarts number and adds 1, until this Business, which runs succeeded or restarts number, to be reached 3 times.If reaching effective time or restarting the threshold value of number, which is not carried out into Work(finishes, then feeds back the result for executing failure to load-balancing device.The effective time of timed task should from execution for the first time Timed task, which rises, starts countdown.The execution device-identification information executes the host address of the timed task, holds before including The time of row failure restarts number and executes the reason of failing.
The method for scheduling task based on distributed scheduling system that above-described embodiment proposes, by receiving large batch of task Scheduling request asks batch to create timed task, by the relevant information of each timed task with the side of message according to task scheduling Formula is stored to message queue.Then, the timed task in message queue is received, is issued to each timed task by preset mode Corresponding host executes, and monitors the execution state of each timed task in real time.If certain timed task executes failure, by preset Task restarts regular automatic trigger and executes the host of the timed task executes the timed task again, if restarting by preset task The triggering execution timed task still returns to status of fail to rule again, then load-balancing device is written in the timed task and holds The timed task is forwarded to other hosts after row device-identification information to execute, until the timed task runs succeeded, this is determined When task action result stored in the form of daily record to database, to effectively improve the handling capacity of entire distributed system, improve The treatment effeciency of timed task.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium Include task dispatch 10, following operation is realized when the task dispatch 10 is executed by processor:
Foundation step:Large batch of task scheduling request is received, asks batch to create timed task according to task scheduling, it will The relevant information of each timed task is stored in a manner of message to message queue;
Monitoring step:The timed task in message queue is received, is issued to each timed task accordingly by preset mode Host execute, and monitor the execution state of each timed task in real time;
Execute step:If certain timed task executes failure, restarting regular automatic trigger by preset task, to execute this fixed When task host execute the timed task again, if by preset task restart rule again triggering execute the timed task still Status of fail is so returned to, then load-balancing device be written after execution device-identification information in the timed task by the timed task It is forwarded to other hosts to execute, until the timed task runs succeeded, which is stored in the form of daily record To database.
Preferably, the preset task restarts rule and includes:
The threshold value for restarting number is set, this is executed every preset time triggering within the effective time of the timed task Business, until the timed task is successful or reaches the threshold value for restarting number.
Preferably, the preset mode includes:
According to the quantity of available host, timed task or task groups are evenly distributed to each host and executed, or according to Timed task quantity and host number are distributed to each host by way of modulus remainder and are executed, or by timed task distribute to One or more minimum host of present load executes.
Preferably, the foundation step includes:
The timed task of establishment is subjected to division task groups according to preset division rule, task in each task groups is set Period in triggered time or execute the time.
Preferably, the execution device-identification information executes the host address of the timed task, executes failure before including Time, restart number and execute failure the reason of.
Preferably, this method further includes step:If reaching effective time or restarting the threshold value of number, which does not hold It goes successfully or finishes, then feed back the result for executing failure to load-balancing device.
The specific implementation mode of the computer readable storage medium of the present invention and above-mentioned appointing based on distributed scheduling system The specific implementation mode of business dispatching method is roughly the same, and details are not described herein.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that process, device, article or method including a series of elements include not only those elements, and And further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this There is also other identical elements in the process of element, device, article or method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be expressed in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone, Computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of method for scheduling task based on distributed scheduling system is applied to server, which is characterized in that the method packet It includes:
Foundation step:Large batch of task scheduling request is received, asks batch to create timed task according to task scheduling, it will be each The relevant information of timed task is stored in a manner of message to message queue;
Monitoring step:The timed task in message queue is received, each timed task is issued to corresponding master by preset mode Machine executes, and monitors the execution state of each timed task in real time;
Execute step:If certain timed task executes failure, restarts regular automatic trigger by preset task and execute the timing times The host of business executes the timed task again, if restarting rule by preset task, the triggering execution timed task still returns again Status of fail is returned, then load-balancing device forwards the timed task after execution device-identification information is written in the timed task It executes to other hosts, until the timed task runs succeeded, which is stored in the form of daily record to number According to library.
2. the method for scheduling task according to claim 1 based on distributed scheduling system, which is characterized in that described default Task restart rule and include:
The threshold value for restarting number is set, triggers executing the task every preset time within the effective time of the timed task, directly To timed task success or reaches and restart the threshold value of number.
3. the method for scheduling task according to claim 1 based on distributed scheduling system, which is characterized in that described default Mode include:
According to the quantity of available host, timed task or task groups are evenly distributed to each host and executed, or according to timing Task quantity is distributed to each host by way of modulus remainder with host number and is executed, or timed task is distributed to current One or more minimum host is loaded to execute.
4. the method for scheduling task according to claim 1 based on distributed scheduling system, which is characterized in that the establishment Step includes:
The timed task of establishment is subjected to division task groups according to preset division rule, touching for task in each task groups is set It sends out the time cycle or executes the time.
5. the method for scheduling task according to claim 1 based on distributed scheduling system, which is characterized in that the execution Device-identification information executes the host address of the timed task, the time for executing failure, restarts number and execute mistake before including The reason of losing.
6. according to method for scheduling task of the claim 1-5 any one of them based on distributed scheduling system, which is characterized in that This method further includes step:If reaching effective time or restarting the threshold value of number, which is not carried out successfully or finishes, then Feedback executes the result of failure to load-balancing device.
7. a kind of server, which is characterized in that the server includes:Memory, processor and display, on the memory It is stored with task dispatch, the task dispatch is executed by the processor, it can be achieved that following steps:
Foundation step:Large batch of task scheduling request is received, asks batch to create timed task according to task scheduling, it will be each The relevant information of timed task is stored in a manner of message to message queue;
Monitoring step:The timed task in message queue is received, each timed task is issued to corresponding master by preset mode Machine executes, and monitors the execution state of each timed task in real time;
Execute step:If certain timed task executes failure, restarts regular automatic trigger by preset task and execute the timing times The host of business executes the timed task again, if restarting rule by preset task, the triggering execution timed task still returns again Status of fail is returned, then load-balancing device forwards the timed task after execution device-identification information is written in the timed task It executes to other hosts, until the timed task runs succeeded, which is stored in the form of daily record to number According to library.
8. server according to claim 7, which is characterized in that the preset task restarts rule and includes:
The threshold value for restarting number is set, triggers executing the task every preset time within the effective time of the timed task, directly To timed task success or reaches and restart the threshold value of number.
9. server according to claim 7, which is characterized in that the preset mode includes:
According to the quantity of available host, timed task or task groups are evenly distributed to each host and executed, or according to timing Task quantity is distributed to each host by way of modulus remainder with host number and is executed, or timed task is distributed to current One or more minimum host is loaded to execute.
10. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes task scheduling Program, when the task dispatch is executed by processor, it can be achieved that based on distribution as described in any one of claim 1 to 6 Formula dispatches the step of method for scheduling task of system.
CN201810546967.8A 2018-05-31 2018-05-31 Method for scheduling task, server based on distributed scheduling system and storage medium Withdrawn CN108762931A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810546967.8A CN108762931A (en) 2018-05-31 2018-05-31 Method for scheduling task, server based on distributed scheduling system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810546967.8A CN108762931A (en) 2018-05-31 2018-05-31 Method for scheduling task, server based on distributed scheduling system and storage medium

Publications (1)

Publication Number Publication Date
CN108762931A true CN108762931A (en) 2018-11-06

Family

ID=64001182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810546967.8A Withdrawn CN108762931A (en) 2018-05-31 2018-05-31 Method for scheduling task, server based on distributed scheduling system and storage medium

Country Status (1)

Country Link
CN (1) CN108762931A (en)

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656698A (en) * 2018-12-14 2019-04-19 平安城市建设科技(深圳)有限公司 Task processing method, management platform, actuating station and computer readable storage medium
CN109669775A (en) * 2018-12-10 2019-04-23 平安科技(深圳)有限公司 Distributed task dispatching method, system and storage medium
CN110046039A (en) * 2019-03-28 2019-07-23 厦门网宿有限公司 Method for scheduling task and system, control centre's server and storage medium
CN110162392A (en) * 2019-05-29 2019-08-23 北京达佳互联信息技术有限公司 Execution method, apparatus, electronic equipment and the storage medium of periodic task
CN110427220A (en) * 2019-06-17 2019-11-08 深圳绿米联创科技有限公司 Configuration method, device, electronic equipment and the storage medium of device command
CN110515718A (en) * 2019-08-30 2019-11-29 深圳前海微众银行股份有限公司 Method, device, equipment and medium for batch task breakpoint continuation
CN110532114A (en) * 2019-09-04 2019-12-03 浪潮云信息技术有限公司 Timing task management system and distribution method based on message queue
CN110795218A (en) * 2019-10-11 2020-02-14 口碑(上海)信息技术有限公司 Task scheduling system and method based on unitization
CN110806933A (en) * 2019-11-05 2020-02-18 中国建设银行股份有限公司 Batch task processing method, device, equipment and storage medium
CN111010313A (en) * 2019-12-05 2020-04-14 深圳联想懂的通信有限公司 Batch processing state monitoring method, server and storage medium
CN111078411A (en) * 2019-12-12 2020-04-28 创新奇智(青岛)科技有限公司 Task scheduling system and scheduling method based on hybrid cloud
CN111124806A (en) * 2019-11-25 2020-05-08 山东鲁能软件技术有限公司 Equipment state real-time monitoring method and system based on distributed scheduling task
CN111142977A (en) * 2019-12-26 2020-05-12 深圳前海环融联易信息科技服务有限公司 Processing method and device of timing task, computer equipment and storage medium
WO2020192733A1 (en) * 2019-03-27 2020-10-01 京东方科技集团股份有限公司 Timed task configuration method, server, system and computer-readable storage medium
CN111782351A (en) * 2019-07-18 2020-10-16 北京京东尚科信息技术有限公司 A method and device for distributed task scheduling
CN111949384A (en) * 2019-05-14 2020-11-17 龙芯中科技术有限公司 Task scheduling method, device, equipment and computer readable storage medium
CN112068940A (en) * 2020-09-02 2020-12-11 微医云(杭州)控股有限公司 Real-time task scheduling method, device, scheduling system and storage medium
WO2020248626A1 (en) * 2019-06-10 2020-12-17 北京达佳互联信息技术有限公司 Task execution method, apparatus, device and system, and storage medium
CN112148505A (en) * 2020-09-18 2020-12-29 京东数字科技控股股份有限公司 Data running batch system, method, electronic device and storage medium
CN112269649A (en) * 2020-11-20 2021-01-26 北京泽石科技有限公司 Method, device and system for realizing asynchronous execution of host task
CN112330854A (en) * 2020-09-24 2021-02-05 深圳市智莱科技股份有限公司 Charging cabinet opening method, server and computer readable storage medium
CN112463312A (en) * 2020-11-02 2021-03-09 北京健康之家科技有限公司 Dynamic maintenance system and method for timing task, medium and computing equipment
CN112463313A (en) * 2020-11-05 2021-03-09 苏州浪潮智能科技有限公司 Task scheduling method, device, equipment and storage medium of monitoring system
CN113127225A (en) * 2020-01-16 2021-07-16 北京沃东天骏信息技术有限公司 Method, device and system for scheduling data processing tasks
CN113179304A (en) * 2021-04-22 2021-07-27 平安消费金融有限公司 Message issuing method, system, device and storage medium
CN113194096A (en) * 2021-04-30 2021-07-30 焦点科技股份有限公司 Task scheduling real-time tracking method and system based on distributed architecture
CN113312386A (en) * 2021-05-10 2021-08-27 四川新网银行股份有限公司 Batch warehousing method based on distributed messages
CN113391890A (en) * 2021-04-16 2021-09-14 北京沃东天骏信息技术有限公司 Task processing method, device and equipment and computer storage medium
CN113448699A (en) * 2020-12-30 2021-09-28 北京新氧科技有限公司 Distributed timed task processing system, method and related device
CN113641484A (en) * 2021-10-13 2021-11-12 浙江口碑网络技术有限公司 Task timing scheduling method, device and equipment and computer readable storage medium
CN113760481A (en) * 2020-06-18 2021-12-07 北京沃东天骏信息技术有限公司 Distributed timed task scheduling system and method
CN113934517A (en) * 2020-07-13 2022-01-14 浙江大搜车软件技术有限公司 Timing task scheduling method and device, electronic device and storage medium
CN115981826A (en) * 2023-01-16 2023-04-18 中国人民财产保险股份有限公司 Task scheduling processing method and device, computer equipment and readable storage medium
WO2025057246A1 (en) * 2023-09-14 2025-03-20 Jio Platforms Limited Method and system to manage one or more tasks in a network

Cited By (49)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669775A (en) * 2018-12-10 2019-04-23 平安科技(深圳)有限公司 Distributed task dispatching method, system and storage medium
WO2020119029A1 (en) * 2018-12-10 2020-06-18 平安科技(深圳)有限公司 Distributed task scheduling method and system, and storage medium
CN109656698A (en) * 2018-12-14 2019-04-19 平安城市建设科技(深圳)有限公司 Task processing method, management platform, actuating station and computer readable storage medium
WO2020192733A1 (en) * 2019-03-27 2020-10-01 京东方科技集团股份有限公司 Timed task configuration method, server, system and computer-readable storage medium
CN110046039A (en) * 2019-03-28 2019-07-23 厦门网宿有限公司 Method for scheduling task and system, control centre's server and storage medium
CN111949384B (en) * 2019-05-14 2023-05-02 龙芯中科技术股份有限公司 Task scheduling method, device, equipment and computer readable storage medium
CN111949384A (en) * 2019-05-14 2020-11-17 龙芯中科技术有限公司 Task scheduling method, device, equipment and computer readable storage medium
CN110162392A (en) * 2019-05-29 2019-08-23 北京达佳互联信息技术有限公司 Execution method, apparatus, electronic equipment and the storage medium of periodic task
CN110162392B (en) * 2019-05-29 2022-10-25 北京达佳互联信息技术有限公司 Periodic task execution method and device, electronic equipment and storage medium
WO2020248626A1 (en) * 2019-06-10 2020-12-17 北京达佳互联信息技术有限公司 Task execution method, apparatus, device and system, and storage medium
US11556380B2 (en) 2019-06-10 2023-01-17 Beijing Dajia Internet Information Technology Co., Ltd. Task execution method, apparatus, device and system, and storage medium
CN110427220B (en) * 2019-06-17 2022-08-19 深圳绿米联创科技有限公司 Configuration method and device of device command, electronic device and storage medium
CN110427220A (en) * 2019-06-17 2019-11-08 深圳绿米联创科技有限公司 Configuration method, device, electronic equipment and the storage medium of device command
CN111782351A (en) * 2019-07-18 2020-10-16 北京京东尚科信息技术有限公司 A method and device for distributed task scheduling
CN110515718A (en) * 2019-08-30 2019-11-29 深圳前海微众银行股份有限公司 Method, device, equipment and medium for batch task breakpoint continuation
CN110532114A (en) * 2019-09-04 2019-12-03 浪潮云信息技术有限公司 Timing task management system and distribution method based on message queue
CN110795218B (en) * 2019-10-11 2022-03-01 口碑(上海)信息技术有限公司 Task scheduling system and method based on unitization
CN110795218A (en) * 2019-10-11 2020-02-14 口碑(上海)信息技术有限公司 Task scheduling system and method based on unitization
CN110806933A (en) * 2019-11-05 2020-02-18 中国建设银行股份有限公司 Batch task processing method, device, equipment and storage medium
CN110806933B (en) * 2019-11-05 2022-06-10 中国建设银行股份有限公司 Batch task processing method, device, equipment and storage medium
CN111124806B (en) * 2019-11-25 2023-09-05 山东鲁软数字科技有限公司 Method and system for monitoring equipment state in real time based on distributed scheduling task
CN111124806A (en) * 2019-11-25 2020-05-08 山东鲁能软件技术有限公司 Equipment state real-time monitoring method and system based on distributed scheduling task
CN111010313A (en) * 2019-12-05 2020-04-14 深圳联想懂的通信有限公司 Batch processing state monitoring method, server and storage medium
CN111010313B (en) * 2019-12-05 2021-03-19 深圳联想懂的通信有限公司 Batch processing state monitoring method, server and storage medium
CN111078411A (en) * 2019-12-12 2020-04-28 创新奇智(青岛)科技有限公司 Task scheduling system and scheduling method based on hybrid cloud
CN111142977A (en) * 2019-12-26 2020-05-12 深圳前海环融联易信息科技服务有限公司 Processing method and device of timing task, computer equipment and storage medium
CN111142977B (en) * 2019-12-26 2023-08-18 深圳前海环融联易信息科技服务有限公司 Timing task processing method and device, computer equipment and storage medium
CN113127225A (en) * 2020-01-16 2021-07-16 北京沃东天骏信息技术有限公司 Method, device and system for scheduling data processing tasks
CN113760481A (en) * 2020-06-18 2021-12-07 北京沃东天骏信息技术有限公司 Distributed timed task scheduling system and method
CN113934517B (en) * 2020-07-13 2025-03-11 浙江大搜车软件技术有限公司 Scheduled task scheduling method, device, electronic device and storage medium
CN113934517A (en) * 2020-07-13 2022-01-14 浙江大搜车软件技术有限公司 Timing task scheduling method and device, electronic device and storage medium
CN112068940A (en) * 2020-09-02 2020-12-11 微医云(杭州)控股有限公司 Real-time task scheduling method, device, scheduling system and storage medium
CN112148505A (en) * 2020-09-18 2020-12-29 京东数字科技控股股份有限公司 Data running batch system, method, electronic device and storage medium
CN112330854B (en) * 2020-09-24 2022-08-12 深圳市智莱科技股份有限公司 Charging cabinet opening method, server and computer readable storage medium
CN112330854A (en) * 2020-09-24 2021-02-05 深圳市智莱科技股份有限公司 Charging cabinet opening method, server and computer readable storage medium
CN112463312A (en) * 2020-11-02 2021-03-09 北京健康之家科技有限公司 Dynamic maintenance system and method for timing task, medium and computing equipment
CN112463313B (en) * 2020-11-05 2022-06-07 苏州浪潮智能科技有限公司 A task scheduling method, device, device and storage medium for a monitoring system
CN112463313A (en) * 2020-11-05 2021-03-09 苏州浪潮智能科技有限公司 Task scheduling method, device, equipment and storage medium of monitoring system
CN112269649A (en) * 2020-11-20 2021-01-26 北京泽石科技有限公司 Method, device and system for realizing asynchronous execution of host task
CN113448699A (en) * 2020-12-30 2021-09-28 北京新氧科技有限公司 Distributed timed task processing system, method and related device
CN113391890A (en) * 2021-04-16 2021-09-14 北京沃东天骏信息技术有限公司 Task processing method, device and equipment and computer storage medium
CN113179304A (en) * 2021-04-22 2021-07-27 平安消费金融有限公司 Message issuing method, system, device and storage medium
CN113194096B (en) * 2021-04-30 2022-03-08 焦点科技股份有限公司 Task scheduling real-time tracking method and system based on distributed architecture
CN113194096A (en) * 2021-04-30 2021-07-30 焦点科技股份有限公司 Task scheduling real-time tracking method and system based on distributed architecture
CN113312386A (en) * 2021-05-10 2021-08-27 四川新网银行股份有限公司 Batch warehousing method based on distributed messages
CN113641484A (en) * 2021-10-13 2021-11-12 浙江口碑网络技术有限公司 Task timing scheduling method, device and equipment and computer readable storage medium
CN115981826A (en) * 2023-01-16 2023-04-18 中国人民财产保险股份有限公司 Task scheduling processing method and device, computer equipment and readable storage medium
CN115981826B (en) * 2023-01-16 2025-01-21 中国人民财产保险股份有限公司 Task scheduling processing method, device, computer equipment and readable storage medium
WO2025057246A1 (en) * 2023-09-14 2025-03-20 Jio Platforms Limited Method and system to manage one or more tasks in a network

Similar Documents

Publication Publication Date Title
CN108762931A (en) Method for scheduling task, server based on distributed scheduling system and storage medium
EP3786793B1 (en) Task processing method and device, and computer system
US12333327B2 (en) Coordinated container scheduling for improved resource allocation in virtual computing environment
US10430332B2 (en) System and method for performance tuning of garbage collection algorithms
CN102147746B (en) Dynamic thread pool management system and method
US10228979B1 (en) Dynamic virtual partitioning for delayed queues
US9852220B1 (en) Distributed workflow management system
CN114090580B (en) Data processing method, device, equipment, storage medium and product
CN112685148B (en) Asynchronous communication method and device for mass terminals, computer equipment and storage medium
CN104714835A (en) Data access processing method and device
US8973117B2 (en) Propagating security identity information to components of a composite application
CN107153643B (en) Data table connection method and device
CN115525631A (en) Database data migration method, device, equipment and storage medium
CN109842621A (en) A kind of method and terminal reducing token storage quantity
CN116795647A (en) A database heterogeneous resource management and scheduling method, device, equipment and medium
WO2024037132A1 (en) Workflow processing method and apparatus, and device, storage medium and program product
CN117827365A (en) Port allocation method, device, equipment, medium and product for application container
CN117971491A (en) In-process resource control method, device, equipment and storage medium
CN107682391A (en) Electronic installation, server-assignment control method and computer-readable recording medium
CN113157411A (en) Reliable configurable task system and device based on Celery
US9659041B2 (en) Model for capturing audit trail data with reduced probability of loss of critical data
CN111104212A (en) Scheduling task execution method and device, electronic equipment and storage medium
CN113535368B (en) Task processing method and device and electronic equipment
CN105740065A (en) Method and device for controlling execution of asynchronous tasks
CN114756362A (en) Resource quota management method and system, intelligent terminal and storage medium

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20181106

WW01 Invention patent application withdrawn after publication