CN108255589A - Method for scheduling task and server - Google Patents
Method for scheduling task and server Download PDFInfo
- Publication number
- CN108255589A CN108255589A CN201710756348.7A CN201710756348A CN108255589A CN 108255589 A CN108255589 A CN 108255589A CN 201710756348 A CN201710756348 A CN 201710756348A CN 108255589 A CN108255589 A CN 108255589A
- Authority
- CN
- China
- Prior art keywords
- task
- pending task
- pending
- tasks carrying
- carrying side
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention is suitable for task scheduling technique field, provides method for scheduling task and server.This method includes:Obtain each pending task that each task requests side is sent;Each pending task is detected, and obtains the current priority orders of each pending task;Each pending task is sent to corresponding tasks carrying side by sequence successively according to the priority, so that corresponding tasks carrying side performs each pending task;Wherein, when the pending task of high priority is not run succeeded by corresponding tasks carrying side, the pending task of low priority corresponding tasks carrying side is not sent to.Above-mentioned method for scheduling task and server carry out being uniformly controlled scheduling by each pending task to each task requests side, and the scheduling so as to the more safe and accurate pending task of progress performs.
Description
Technical field
The invention belongs to task scheduling technique field more particularly to method for scheduling task and server.
Background technology
When internal system has timed task to need to perform, the quartz functions in spring softwares is generally used
It completes.If being related to the dependence between each task, need to control indirectly by some identification records, it is each at this time
It is substantially isolated between task, system is caused easily each task not controlled and be managed.
Invention content
In view of this, an embodiment of the present invention provides method for scheduling task and servers, each in the prior art to solve
The problem of isolation leads to not easily each task is controlled and managed between task.
The first aspect of the embodiment of the present invention provides a kind of method for scheduling task, including:
Obtain each pending task that each task requests side is sent;
Each pending task is detected, and obtains the current priority orders of each pending task;
Each pending task is sent to corresponding tasks carrying side by sequence successively according to the priority, so that
It obtains corresponding tasks carrying side and performs each pending task;
It wherein, will not be low preferential when the pending task of high priority is not run succeeded by corresponding tasks carrying side
The pending task of grade is sent to corresponding tasks carrying side.
Optionally, each pending task of the detection, and obtain current preferential of each pending task
Grade sequence be specially:
Every preset time primary each pending task is detected, and obtain each pending task currently
Priority orders.
Optionally, the pending task includes task execution time information;The each pending task of detection,
And it obtains the current priority orders of each pending task and specifically includes:
Detect the task execution time of each pending task;
According to the task execution time of each pending task, current current of each pending task is determined
Priority orders.
Optionally, each pending task is sent to corresponding task by the sequence according to the priority successively
The side of execution specifically includes so that corresponding tasks carrying side performs each pending task:
Each pending task is sent to and corresponding tasks carrying side pair by sequence successively according to the priority
The client answered;The number of the client is multiple, and a client corresponds to a tasks carrying side;
Described in the client is performed according to the pending task by the corresponding tasks carrying side of shell Script controllings
Pending task.
Optionally, the pending task includes task execution time information and tasks carrying side's identification information;It is each to appoint
Business execution side's identification information corresponds to a client;
Each pending task is sent to and corresponding tasks carrying by the sequence according to the priority successively
Just corresponding client is specially:
According to the priority sequence, by each pending task be sent to in each pending task
Client corresponding to tasks carrying side's identification information.
The second aspect of the embodiment of the present invention provides a kind of server, including memory, processor, in the memory
The computer program that can be run on the processor is stored with, the processor is realized as follows when performing the computer program
Step:
Obtain each pending task that each task requests side is sent;
Each pending task is detected, and obtains the current priority orders of each pending task;
Each pending task is sent to corresponding tasks carrying side by sequence successively according to the priority, so that
It obtains corresponding tasks carrying side and performs each pending task;
It wherein, will not be low preferential when the pending task of high priority is not run succeeded by corresponding tasks carrying side
The pending task of grade is sent to corresponding tasks carrying side.
Optionally, each pending task of the detection, and obtain current preferential of each pending task
Grade sequence be specially:
Every preset time primary each pending task is detected, and obtain each pending task currently
Priority orders.
Optionally, each pending task of the detection, and obtain current preferential of each pending task
Grade sequence be specially:
Detect the execution time requirement of each pending task;
According to the execution time requirement of each pending task, current current of each pending task is determined
Priority orders.
Optionally, each pending task is sent to corresponding task by the sequence according to the priority successively
The side of execution specifically includes so that corresponding tasks carrying side performs each pending task:
Each pending task is sent to and corresponding tasks carrying side pair by sequence successively according to the priority
The client answered;The number of the client is multiple, and a client corresponds to a tasks carrying side;
Described in the client is performed according to the pending task by the corresponding tasks carrying side of shell Script controllings
Pending task.
Optionally, the pending task includes task execution time information and tasks carrying side's identification information;It is each to appoint
Business execution side's identification information corresponds to a client;
Each pending task is sent to and corresponding tasks carrying by the sequence according to the priority successively
Just corresponding client is specially:
According to the priority sequence, by each pending task be sent to in each pending task
Client corresponding to tasks carrying side's identification information.
The third aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, and the step such as above-mentioned method for scheduling task is realized when the computer program is executed by processor
Suddenly.
Existing advantageous effect is the embodiment of the present invention compared with prior art:The embodiment of the present invention obtains each first
Each pending task that task requests side is sent detects each pending task and obtains current excellent of each pending task
First grade sequence, is sequentially sent to corresponding tasks carrying side by each pending task successively according to the priority, so that
Corresponding tasks carrying side performs each pending task;And high priority pending task not by corresponding tasks carrying
When side runs succeeded, the pending task of low priority corresponding tasks carrying side is not sent to, by being asked to each task
The each pending task for the side of asking carries out being uniformly controlled scheduling, so as to the more safe and accurate pending task of progress
Scheduling performs.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some
Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the realization flow chart of method for scheduling task provided in an embodiment of the present invention;
Fig. 2 is the realization flow chart of step S102 in Fig. 1;
Fig. 3 is the realization flow chart of step S103 in Fig. 1;
Fig. 4 is the running environment schematic diagram of task dispatch provided in an embodiment of the present invention;
Fig. 5 is the Program modual graph of task dispatch provided in an embodiment of the present invention.
Specific embodiment
In being described below, in order to illustrate rather than in order to limit, it is proposed that such as tool of particular system structure, technology etc
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specifically
The present invention can also be realized in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
Road and the detailed description of method, in case unnecessary details interferes description of the invention.
Technical term " first ", " second " in the specification and claims of the embodiment of the present invention etc. are for distinguishing
Similar object describes specific sequence precedence without being used for.It should be appreciated that the data used in this way are in appropriate situation
Under can be interchanged, so that the embodiment of the present invention described herein can be with other than those for illustrating or describing herein
Sequence is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover those non-exclusive packets
Contain, for example, containing the process of series of steps or unit, method, system, product or equipment is not necessarily limited to what is clearly listed
Those steps or unit, but may include not listing clearly or for these processes, method, system, product or equipment
Other intrinsic steps or unit.
It it should be appreciated that ought be special described by the instruction of term " comprising " use in this specification and in the appended claims
Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step,
Operation, element, component and/or its presence or addition gathered.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combinations and all possible combinations of one or more of the associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt
Be construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase " if it is determined that " or
" if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true
It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
Embodiment one
Fig. 1 shows the realization flow for the method for scheduling task that the embodiment of the present invention one provides, and details are as follows:
Step S101 obtains each pending task that each task requests side is sent.
Wherein, task requests side is the side for initiating pending task, opposite with the tasks carrying side in subsequent step, is appointed
Business execution side is the side for performing each pending task.
In the present embodiment, pending task can include real-time task, quasi real time task and other tasks.Real-time task master
It is high to refer to emergency requirement, task of tasks carrying side being needed to be immediately performed.Quasi real time it is of less demanding to refer mainly to emergency for task,
But also (such as in 10 minutes) task-performance instructions must be forwarded to tasks carrying side within the time of restriction.Other tasks
It is then of less demanding for emergency, to performing the time without the longer task of requirement or time.
Step S102 detects each pending task, and obtains the current priority of each pending task
Sequentially.
Optionally, step S102 is specifically as follows:Primary each pending task is detected, and obtain every preset time
The priority orders for taking each pending task current.
It should be understood that in the pending task for constantly obtaining the transmission of task requests side in step S101, it is therefore desirable to
The pending task got is updated.It is each by once being got every preset time detection in the present embodiment
Then pending task determines the current priority orders of each pending task.
As a kind of embodiment, the pending task can include task execution time information, tasks carrying side
Information, task requests side's information etc..Referring to Fig. 2, in the present embodiment, the pending task includes task execution time information,
Step S102 may comprise steps of:
Step S201 detects the task execution time of each pending task.
Wherein, each pending task corresponds to a task execution time, and task execution time can be the period, also may be used
Think time point.For example, 16:00 gets two pending tasks, the task execution time in first pending task
It is 16:05, the task execution time of second pending task is 16:10~16:20.Pending of first got
The task execution time of business is time point, and the task execution time of second pending task is the period.
Step S202 according to the task execution time of each pending task, determines each pending task
Current priority orders.
In the present embodiment, current excellent of each pending task is determined by the task execution time of each pending task
First grade sequence.It specifically, can be using the sequencing of task execution time as the priority orders of each pending task, i.e.,
The priority of the forward pending task of task execution time is higher, the pending task of task execution time rearward it is preferential
Grade is relatively low.
In the task execution time according to each pending task, the current priority of each pending task is determined
After sequence, then according to the priority orders of identified each pending task, each pending task is sent to
Corresponding tasks carrying side, so that corresponding tasks carrying side performs each pending task.Specifically, high preferential
When the pending task of grade is not run succeeded by corresponding tasks carrying side, the pending task of low priority phase is not sent to
The tasks carrying side answered.
For example, three pending tasks are respectively the first pending task, the second pending task and pending of third
Business, the task execution time of the first pending task is 16:05, the task execution time of the second pending task is 16:10~
16:20, the task execution time of the pending task of third is 16:40, then the priority orders of three pending tasks by height to
It is low to be followed successively by the first pending task, the second pending task and the pending task of third.
Each pending task is sequentially sent to corresponding task successively according to the priority and held by step S103
Row side, so that corresponding tasks carrying side performs each pending task.
It wherein, will not be low preferential when the pending task of high priority is not run succeeded by corresponding tasks carrying side
The pending task of grade is sent to corresponding tasks carrying side.
For example, three pending tasks are respectively the first pending task, the second pending task and pending of third
Business, the task execution time of the first pending task is 16:05, the task execution time of the second pending task is 16:10~
16:20, the task execution time of the pending task of third is 16:40, then the priority orders of three pending tasks by height to
It is low to be followed successively by the first pending task, the second pending task and the pending task of third.
Wherein, when the first pending task is not carried out or is not carried out successfully, not by the second pending task and the third generation
Execution task is sent to corresponding tasks carrying side and performs;Until during the first pending tasks carrying success, then second is waited to hold
Row task is sent to corresponding tasks carrying side and performs;In the second pending task to perform or when being not carried out successfully, not by the
Three pending tasks are sent to corresponding tasks carrying side and perform, until during the second pending tasks carrying success, by third
Pending task is sent to corresponding tasks carrying side and performs.
Referring to Fig. 3, in one embodiment, step S103 may comprise steps of:
Each pending task is sequentially sent to and corresponding task by step S301 successively according to the priority
The corresponding client in execution side.
Wherein, the number of the client is multiple, and a client corresponds to a tasks carrying side.Each client
End is affixed one's name on the host of tasks carrying side, can perform the shell scripts of tasks carrying side.Each client is in tasks carrying side
Deployment way can be single-point deployment way, HA (Hadoop) deployment way, Cluster (cluster) deployment way or assembly type
Deployment way.
In the present embodiment, sequentially each pending task can be sent to successively according to the priority and appointed with corresponding
The corresponding client in business execution side, so that client causes tasks carrying side to perform the pending task.
For example, can be according to the sequencing of the task execution time of each pending task, it successively will be each pending
Task is sent to client corresponding with corresponding tasks carrying side, so that client causes tasks carrying side to perform this and wait to hold
Row task.
Step S302, the client pass through the corresponding tasks carrying of shell Script controllings according to the pending task
Pending task described in Fang Zhihang.
Method for scheduling task in the present embodiment is suitable for task management center, which includes task scheduling
Center and multiple client.Task scheduling center initiates to call according to task requests side or set strategy to tasks carrying side to be referred to
It enables;Task scheduling center is responsible for carrying out management and control, such as monitor task execution time to each pending task, in tasks carrying
Between forward previous band when performing task and being not carried out or be not carried out successfully, do not issued to corresponding tasks carrying side and perform the time and lean on
The execute instruction of latter pending task afterwards, until after previous pending tasks carrying success, next pending of regeneration
The execute instruction of business is sent to corresponding client, and the pending task is performed by the client control task execution side.It is logical
It crosses task management center to control each pending task, each pending task of carry out that can be more safe and accurate
Scheduling perform.
In one embodiment, the data interaction between task requests side, task scheduling center, client and tasks carrying side
Process is as follows:
Real-time task request is sent to task scheduling center by task requests side, and real-time task is direct by task initiator
To task scheduling center requests, calling task execution side, which performs, immediately changes pending task;
After task scheduling center gets real-time task request, the letters such as tasks carrying side in being asked according to real-time task
Breath generates real-time task execute instruction, corresponding client is sent to by interface;
Client controls corresponding tasks carrying side to perform real-time task execute instruction according to the real-time task execute instruction
In real-time task.
In another embodiment, the data between task requests side, task scheduling center, client and tasks carrying side are handed over
Mutual process is as follows:
Task requests side quasi real time task requests will be sent to task scheduling center, and quasi real time task is by task requests side
Directly to the request of control centre, control centre can initiate to perform within some time according to actual conditions to tasks carrying side to be referred to
It enables;
After task scheduling center gets quasi real time task requests, task names in quasi real time task requests are appointed
Business performs the information such as time, the corresponding client of task, generates quasi real time task-performance instructions, and according to actual conditions at some
Time is sent to corresponding client by interface.For example, quasi real time task can receive requesting party's system call
Afterwards, the instruction of calling task is forwarded to service side within 10 minutes;
According to this, quasi real time task-performance instructions, control task execution side perform in quasi real time task-performance instructions client
Quasi real time task.
Above-mentioned method for scheduling task, obtains each pending task that each task requests side is sent first, and detection is each
Pending task simultaneously obtains the current priority orders of each pending task, and sequence is treated successively by each according to the priority
Execution task is sent to corresponding tasks carrying side, so that corresponding tasks carrying side performs each pending task;And
When the pending task of high priority is not run succeeded by corresponding tasks carrying side, the pending task of low priority is not sent out
Corresponding tasks carrying side is given, carries out being uniformly controlled scheduling by each pending task to each task requests side, from
And the scheduling of the pending task of progress that can be more safe and accurate performs.
It should be understood that the size of the serial number of each step is not meant to the priority of execution sequence, each process in above-described embodiment
Execution sequence should determine that the implementation process without coping with the embodiment of the present invention forms any limit with its function and internal logic
It is fixed.
Embodiment two
Corresponding to the method for scheduling task described in foregoing embodiments, Fig. 4 shows task tune provided in an embodiment of the present invention
Spend the running environment schematic diagram of program.For convenience of description, part related to the present embodiment is illustrated only.
In the present embodiment, the task dispatch 400 is installed and is run in server 40.The server 40 can
It include but are not limited to, memory 401 and processor 402.Fig. 4 illustrates only the server 40 with component 401-402, but
It is that should be understood that, it is not required that implement all components shown, the more or less component of the implementation that can be substituted.
The memory 401 includes at least a type of computer readable storage medium, in some embodiments may be used
To be the internal storage unit of the server 40, such as the hard disk or memory of the server 40.The memory 401 is another
Can also be the External memory equipment of the server 40 in a little embodiments, such as the plug-in type being equipped on the server 40 is hard
Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card
(Flash Card) etc..Further, the memory 401 can also both including the server 40 internal storage unit or
Including External memory equipment.The memory 401 is installed on the application software and Various types of data of the server 40 for storing,
Such as program code of the task dispatch 400 etc..The memory 401, which can be also used for temporarily storing, have been exported
Or the data that will be exported.
The processor 402 can be a central processing unit (Central Processing in some embodiments
Unit, CPU), microprocessor or other data processing chips, for run the program code that is stored in the memory 401 or
Data are handled, such as perform described task dispatch 400 etc..
In addition, server 40 can also include display.The display can be that LED is shown in some embodiments
Device, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, organic light emission
Diode) touch device etc..The display is used to being shown in the information that is handled in the server 40 and visual for showing
The user interface of change, such as task scheduling interface etc..The component 401-402 of the server 40 passes through system bus phase intercommunication
Letter.
Referring to Fig. 5, it is the Program modual graph of task dispatch 400 provided in an embodiment of the present invention.In the present embodiment
In, the task dispatch 400 can be divided into one or more modules, and one or more of modules are stored
In the memory 401, and it is performed by one or more processors (the present embodiment is the processor 402), to complete
The present invention.For example, in Figure 5, the task dispatch 400 can be divided into pending task acquisition module 501, inspection
Survey module 502 and execution module 503.The so-called module of the present invention is the series of computation machine program for referring to complete specific function
Instruction segment, than program more suitable for describing implementation procedure of the task dispatch 400 in the server 40.It retouches below
State the function of specifically introducing the program module 501-503.
Wherein, pending task acquisition module 501, for obtaining each pending of each task requests side's transmission
Business.
Detection module 502, for detecting each pending task, and it is current to obtain each pending task
Priority orders.
Each pending task is sent to accordingly by execution module 503 successively for sequence according to the priority
Tasks carrying side so that corresponding tasks carrying side performs each pending task.Wherein, it is treated in high priority
When execution task is not run succeeded by corresponding tasks carrying side, the pending task of low priority corresponding appoint is not sent to
Be engaged in the side of execution.
Optionally, detection module 502 is specifically used for:Primary each pending task is detected every preset time, and
Obtain the current priority orders of each pending task.
Optionally, detection module 502 can include time detection unit and priority determining unit.The time detection is single
Member is used to detect the task execution time of each pending task.The priority determining unit is used for according to each described
The task execution time of pending task determines the current current priority sequence of each pending task.
Optionally, execution module 503 can include transmitting element and execution unit.The transmitting element is used for according to preferential
Each pending task is sent to execution unit corresponding with corresponding tasks carrying side by grade sequence successively;Each
Execution unit corresponds to a client, and the number of the client is multiple, and a client corresponds to a tasks carrying
Side.The execution unit is used to perform institute by the corresponding tasks carrying side of shell Script controllings according to the pending task
State pending task.
Optionally, the pending task includes task execution time information and tasks carrying side's identification information;It is each to appoint
Business execution side's identification information corresponds to a client.The transmitting element is specifically used for:Sequence according to the priority, will
Each pending task is sent to the client corresponding with tasks carrying side's identification information in each pending task
End.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each work(
Can unit, module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device are divided into different functional units or module, more than completion
The all or part of function of description.Each functional unit, module in embodiment can be integrated in a processing unit, also may be used
To be that each unit is individually physically present, can also two or more units integrate in a unit, it is above-mentioned integrated
The form that hardware had both may be used in unit is realized, can also be realized in the form of SFU software functional unit.In addition, each function list
Member, the specific name of module are not limited to the protection domain of the application also only to facilitate mutually distinguish.Above system
The specific work process of middle unit, module can refer to the corresponding process in preceding method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may realize that each exemplary lists described with reference to the embodiments described herein
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is performed with hardware or software mode, specific application and design constraint depending on technical solution.Professional technician
Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with
It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of division of logic function can have other dividing mode in actual implementation, such as
Multiple units or component may be combined or can be integrated into another system or some features can be ignored or does not perform.Separately
A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be by some interfaces, device
Or the INDIRECT COUPLING of unit or communication connection, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
That each unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated module/unit realized in the form of SFU software functional unit and be independent product sale or
In use, it can be stored in a computer read/write memory medium.Based on such understanding, the present invention realizes above-mentioned implementation
All or part of flow in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium
It can include:Any entity of the computer program code or device, recording medium, USB flash disk, mobile hard disk, magnetic can be carried
Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It is it should be noted that described
The content that computer-readable medium includes can carry out appropriate increasing according to legislation in jurisdiction and the requirement of patent practice
Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and electricity
Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to aforementioned reality
Example is applied the present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each
Technical solution recorded in embodiment modifies or carries out equivalent replacement to which part technical characteristic;And these are changed
Or replace, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of method for scheduling task, which is characterized in that including:
Obtain each pending task that each task requests side is sent;
Each pending task is detected, and obtains the current priority orders of each pending task;
Each pending task is sent to corresponding tasks carrying side by sequence successively according to the priority, so that phase
The tasks carrying side answered performs each pending task;
Wherein, when the pending task of high priority is not run succeeded by corresponding tasks carrying side, not by low priority
Pending task is sent to corresponding tasks carrying side.
2. method for scheduling task as described in claim 1, which is characterized in that each pending task of detection, and
Obtaining the current priority orders of each pending task is specially:
Primary each pending task is detected every preset time, and obtains each pending task currently preferential
Grade sequence.
3. method for scheduling task as described in claim 1, which is characterized in that the pending task includes task execution time
Information;The each pending task of detection, and it is specific to obtain the current priority orders of each pending task
Including:
Detect the task execution time of each pending task;
According to the task execution time of each pending task, the current current preference of each pending task is determined
Grade sequence.
4. method for scheduling task as described in any one of claims 1 to 3, which is characterized in that described suitable according to the priority
Each pending task is sent to corresponding tasks carrying side by sequence successively, so that corresponding tasks carrying side performs respectively
A pending task specifically includes:
Each pending task is sent to corresponding with corresponding tasks carrying side by sequence successively according to the priority
Client;The number of the client is multiple, and a client corresponds to a tasks carrying side;
The client is waited to hold described in being performed by the corresponding tasks carrying side of shell Script controllings according to the pending task
Row task.
5. method for scheduling task as claimed in claim 4, which is characterized in that the pending task includes task execution time
Information and tasks carrying side's identification information;Each tasks carrying side identification information corresponds to a client;
Each pending task is sent to and corresponding tasks carrying side pair by the sequence according to the priority successively
The client answered is specially:
Sequence according to the priority, each pending task is sent to and the task in each pending task
Client corresponding to execution side's identification information.
6. a kind of server, which is characterized in that including memory, processor, being stored in the memory can be in the processing
The computer program run on device, the processor realize following steps when performing the computer program:
Obtain each pending task that each task requests side is sent;
Each pending task is detected, and obtains the current priority orders of each pending task;
Each pending task is sent to corresponding tasks carrying side by sequence successively according to the priority, so that phase
The tasks carrying side answered performs each pending task;
Wherein, when the pending task of high priority is not run succeeded by corresponding tasks carrying side, not by low priority
Pending task is sent to corresponding tasks carrying side.
7. server as claimed in claim 6, which is characterized in that each pending task of detection, and obtain each
The current priority orders of a pending task are specially:
Primary each pending task is detected every preset time, and obtains each pending task currently preferential
Grade sequence.
8. server as claimed in claim 6, which is characterized in that each pending task of detection, and obtain each
The current priority orders of a pending task are specially:
Detect the execution time requirement of each pending task;
According to the execution time requirement of each pending task, the current current preference of each pending task is determined
Grade sequence.
9. such as claim 6 to 8 any one of them server, which is characterized in that the sequence according to the priority is successively
Each pending task is sent to corresponding tasks carrying side, so that corresponding tasks carrying side's execution is each described
Pending task specifically includes:
Each pending task is sent to corresponding with corresponding tasks carrying side by sequence successively according to the priority
Client;The number of the client is multiple, and a client corresponds to a tasks carrying side;
The client is waited to hold described in being performed by the corresponding tasks carrying side of shell Script controllings according to the pending task
Row task.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In when the computer program is executed by processor the step of realization such as any one of claim 1 to 5 the method.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710756348.7A CN108255589A (en) | 2017-08-29 | 2017-08-29 | Method for scheduling task and server |
PCT/CN2018/083048 WO2019041824A1 (en) | 2017-08-29 | 2018-04-13 | Task scheduling method and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710756348.7A CN108255589A (en) | 2017-08-29 | 2017-08-29 | Method for scheduling task and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108255589A true CN108255589A (en) | 2018-07-06 |
Family
ID=62721189
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710756348.7A Pending CN108255589A (en) | 2017-08-29 | 2017-08-29 | Method for scheduling task and server |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108255589A (en) |
WO (1) | WO2019041824A1 (en) |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109213586A (en) * | 2018-08-23 | 2019-01-15 | 北京奇虎科技有限公司 | A kind of dispatching method and device of task |
CN109816338A (en) * | 2019-01-03 | 2019-05-28 | 深圳壹账通智能科技有限公司 | Enterprise's rewards and punishments processing method, device, computer equipment and storage medium |
CN110083712A (en) * | 2019-03-12 | 2019-08-02 | 平安科技(深圳)有限公司 | A kind of method for reading data, system and terminal device |
CN110162388A (en) * | 2019-04-26 | 2019-08-23 | 深圳智链物联科技有限公司 | A kind of method for scheduling task, system and terminal device |
CN110334011A (en) * | 2019-05-31 | 2019-10-15 | 浙江口碑网络技术有限公司 | A kind of method and device of implementation of test cases |
CN110347602A (en) * | 2019-07-11 | 2019-10-18 | 中国工商银行股份有限公司 | Multitask script execution and device, electronic equipment and readable storage medium storing program for executing |
CN110489217A (en) * | 2019-07-11 | 2019-11-22 | 新华三大数据技术有限公司 | A kind of method for scheduling task and system |
CN110750341A (en) * | 2018-07-24 | 2020-02-04 | 深圳市优必选科技有限公司 | Task scheduling method, device, system, terminal equipment and storage medium |
CN111124566A (en) * | 2019-11-29 | 2020-05-08 | 苏州浪潮智能科技有限公司 | BMC user interface operation management method, equipment and readable medium |
CN111309475A (en) * | 2020-01-21 | 2020-06-19 | 上海悦易网络信息技术有限公司 | Detection task execution method and device |
CN111338967A (en) * | 2020-03-09 | 2020-06-26 | 京东数字科技控股有限公司 | Shunting test method and device, electronic equipment and storage medium |
CN111381956A (en) * | 2018-12-28 | 2020-07-07 | 杭州海康威视数字技术股份有限公司 | Task processing method and device and cloud analysis system |
CN111400005A (en) * | 2020-03-13 | 2020-07-10 | 北京搜狐新媒体信息技术有限公司 | Data processing method and device and electronic equipment |
CN111858012A (en) * | 2020-08-05 | 2020-10-30 | 杭州安恒信息技术股份有限公司 | Task scheduling method, device, equipment and medium |
CN113177680A (en) * | 2021-03-10 | 2021-07-27 | 广州明珞自动化有限公司 | Task execution system, task execution method and production system |
CN113641493A (en) * | 2021-08-11 | 2021-11-12 | 杭州安恒信息技术股份有限公司 | Task pushing method, device and equipment and computer readable storage medium |
CN113723936A (en) * | 2021-10-12 | 2021-11-30 | 国网安徽省电力有限公司宿州供电公司 | Power engineering quality supervision and management method and system |
WO2021238153A1 (en) * | 2020-05-28 | 2021-12-02 | 苏州大学 | Thread time management method and apparatus for embedded real-time operation |
CN114095487A (en) * | 2020-07-30 | 2022-02-25 | 中移(苏州)软件技术有限公司 | Remote task execution method and device and storage medium |
CN114253683A (en) * | 2021-11-26 | 2022-03-29 | 北京百度网讯科技有限公司 | Task processing method and device, electronic equipment and storage medium |
CN114418282A (en) * | 2021-12-08 | 2022-04-29 | 交控科技股份有限公司 | Station scene management method, device, equipment and computer program product |
CN114896050A (en) * | 2022-07-12 | 2022-08-12 | 北京云枢创新软件技术有限公司 | Task scheduling method and system based on cluster resources |
WO2023225938A1 (en) * | 2022-05-26 | 2023-11-30 | Citrix Systems, Inc. | Systems and methods for scheduling multiple participant tasks |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2017608A1 (en) * | 1989-05-29 | 1990-11-29 | Koji Niitaka | Method and apparatus for managing tasks |
CN101202761A (en) * | 2007-12-04 | 2008-06-18 | 赵晓宇 | System of distributed resource scheduling and method thereof |
CN101561768A (en) * | 2008-04-18 | 2009-10-21 | 北京闻言科技有限公司 | Universal multitask scheduling method |
CN101741885A (en) * | 2008-11-19 | 2010-06-16 | 珠海市西山居软件有限公司 | Distributed system and method for processing task flow thereof |
CN102023895A (en) * | 2010-11-25 | 2011-04-20 | 广东雅达电子股份有限公司 | Singlechip programming method with priority task switching |
CN102395108A (en) * | 2011-11-28 | 2012-03-28 | 苏州迈普信息技术有限公司 | Cooperated rescue method based on mobile localization |
CN104346215A (en) * | 2013-08-07 | 2015-02-11 | 中兴通讯股份有限公司 | Task scheduling service system and method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8087026B2 (en) * | 2006-04-27 | 2011-12-27 | International Business Machines Corporation | Fair share scheduling based on an individual user's resource usage and the tracking of that usage |
CN101169741B (en) * | 2006-10-25 | 2010-06-16 | 国际商业机器公司 | Method and system for determining scheduling priority of operation |
CN101452399B (en) * | 2007-12-05 | 2011-04-20 | 中兴通讯股份有限公司 | Task secondary scheduling module and method |
CN102421060B (en) * | 2011-11-28 | 2013-01-23 | 苏州迈普信息技术有限公司 | GIS (Geographic Information System)-based emergency condition management system for tour group |
-
2017
- 2017-08-29 CN CN201710756348.7A patent/CN108255589A/en active Pending
-
2018
- 2018-04-13 WO PCT/CN2018/083048 patent/WO2019041824A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2017608A1 (en) * | 1989-05-29 | 1990-11-29 | Koji Niitaka | Method and apparatus for managing tasks |
CN101202761A (en) * | 2007-12-04 | 2008-06-18 | 赵晓宇 | System of distributed resource scheduling and method thereof |
CN101561768A (en) * | 2008-04-18 | 2009-10-21 | 北京闻言科技有限公司 | Universal multitask scheduling method |
CN101741885A (en) * | 2008-11-19 | 2010-06-16 | 珠海市西山居软件有限公司 | Distributed system and method for processing task flow thereof |
CN102023895A (en) * | 2010-11-25 | 2011-04-20 | 广东雅达电子股份有限公司 | Singlechip programming method with priority task switching |
CN102395108A (en) * | 2011-11-28 | 2012-03-28 | 苏州迈普信息技术有限公司 | Cooperated rescue method based on mobile localization |
CN104346215A (en) * | 2013-08-07 | 2015-02-11 | 中兴通讯股份有限公司 | Task scheduling service system and method |
Cited By (33)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110750341A (en) * | 2018-07-24 | 2020-02-04 | 深圳市优必选科技有限公司 | Task scheduling method, device, system, terminal equipment and storage medium |
CN110750341B (en) * | 2018-07-24 | 2022-08-02 | 深圳市优必选科技有限公司 | Task scheduling method, device, system, terminal equipment and storage medium |
CN109213586A (en) * | 2018-08-23 | 2019-01-15 | 北京奇虎科技有限公司 | A kind of dispatching method and device of task |
CN111381956A (en) * | 2018-12-28 | 2020-07-07 | 杭州海康威视数字技术股份有限公司 | Task processing method and device and cloud analysis system |
CN111381956B (en) * | 2018-12-28 | 2024-02-27 | 杭州海康威视数字技术股份有限公司 | Task processing method and device and cloud analysis system |
CN109816338A (en) * | 2019-01-03 | 2019-05-28 | 深圳壹账通智能科技有限公司 | Enterprise's rewards and punishments processing method, device, computer equipment and storage medium |
CN110083712A (en) * | 2019-03-12 | 2019-08-02 | 平安科技(深圳)有限公司 | A kind of method for reading data, system and terminal device |
CN110162388A (en) * | 2019-04-26 | 2019-08-23 | 深圳智链物联科技有限公司 | A kind of method for scheduling task, system and terminal device |
CN110334011B (en) * | 2019-05-31 | 2023-03-17 | 浙江口碑网络技术有限公司 | Method and device for executing test case |
CN110334011A (en) * | 2019-05-31 | 2019-10-15 | 浙江口碑网络技术有限公司 | A kind of method and device of implementation of test cases |
CN110489217A (en) * | 2019-07-11 | 2019-11-22 | 新华三大数据技术有限公司 | A kind of method for scheduling task and system |
CN110347602A (en) * | 2019-07-11 | 2019-10-18 | 中国工商银行股份有限公司 | Multitask script execution and device, electronic equipment and readable storage medium storing program for executing |
CN111124566A (en) * | 2019-11-29 | 2020-05-08 | 苏州浪潮智能科技有限公司 | BMC user interface operation management method, equipment and readable medium |
CN111309475B (en) * | 2020-01-21 | 2022-12-02 | 上海万物新生环保科技集团有限公司 | Detection task execution method and equipment |
CN111309475A (en) * | 2020-01-21 | 2020-06-19 | 上海悦易网络信息技术有限公司 | Detection task execution method and device |
CN111338967B (en) * | 2020-03-09 | 2023-12-05 | 京东科技控股股份有限公司 | Shunt test method and device, electronic equipment and storage medium |
CN111338967A (en) * | 2020-03-09 | 2020-06-26 | 京东数字科技控股有限公司 | Shunting test method and device, electronic equipment and storage medium |
CN111400005A (en) * | 2020-03-13 | 2020-07-10 | 北京搜狐新媒体信息技术有限公司 | Data processing method and device and electronic equipment |
WO2021238153A1 (en) * | 2020-05-28 | 2021-12-02 | 苏州大学 | Thread time management method and apparatus for embedded real-time operation |
CN114095487A (en) * | 2020-07-30 | 2022-02-25 | 中移(苏州)软件技术有限公司 | Remote task execution method and device and storage medium |
CN114095487B (en) * | 2020-07-30 | 2024-03-19 | 中移(苏州)软件技术有限公司 | Remote task execution method, device and storage medium |
CN111858012A (en) * | 2020-08-05 | 2020-10-30 | 杭州安恒信息技术股份有限公司 | Task scheduling method, device, equipment and medium |
CN113177680A (en) * | 2021-03-10 | 2021-07-27 | 广州明珞自动化有限公司 | Task execution system, task execution method and production system |
CN113641493A (en) * | 2021-08-11 | 2021-11-12 | 杭州安恒信息技术股份有限公司 | Task pushing method, device and equipment and computer readable storage medium |
CN113723936A (en) * | 2021-10-12 | 2021-11-30 | 国网安徽省电力有限公司宿州供电公司 | Power engineering quality supervision and management method and system |
CN113723936B (en) * | 2021-10-12 | 2023-11-14 | 国网安徽省电力有限公司宿州供电公司 | Quality supervision and management method and system for electric power engineering |
US11640319B1 (en) | 2021-11-26 | 2023-05-02 | Beijing Baidu Netcom Science Technology Co., Ltd. | Task processing method and apparatus, electronic device and storage medium |
EP4187382A1 (en) * | 2021-11-26 | 2023-05-31 | Beijing Baidu Netcom Science Technology Co., Ltd. | Task processing method and apparatus, electronic device and storage medium |
CN114253683B (en) * | 2021-11-26 | 2022-11-01 | 北京百度网讯科技有限公司 | Task processing method and device, electronic equipment and storage medium |
CN114253683A (en) * | 2021-11-26 | 2022-03-29 | 北京百度网讯科技有限公司 | Task processing method and device, electronic equipment and storage medium |
CN114418282A (en) * | 2021-12-08 | 2022-04-29 | 交控科技股份有限公司 | Station scene management method, device, equipment and computer program product |
WO2023225938A1 (en) * | 2022-05-26 | 2023-11-30 | Citrix Systems, Inc. | Systems and methods for scheduling multiple participant tasks |
CN114896050A (en) * | 2022-07-12 | 2022-08-12 | 北京云枢创新软件技术有限公司 | Task scheduling method and system based on cluster resources |
Also Published As
Publication number | Publication date |
---|---|
WO2019041824A1 (en) | 2019-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108255589A (en) | Method for scheduling task and server | |
EP2682863B1 (en) | Installing applications remotely | |
CN108182111A (en) | Task scheduling system, method and apparatus | |
CN108683604A (en) | concurrent access control method, terminal device and medium | |
CN110096344A (en) | Task management method, system, server cluster and computer-readable medium | |
CN107748696A (en) | The method and terminal device of a kind of task scheduling | |
CN109582325A (en) | Robot software upgrading method, robot and computer readable storage medium | |
CN110430257A (en) | Information processing method, device, system and readable storage medium storing program for executing | |
CN110225078A (en) | A kind of application service update method, system and terminal device | |
CN107832134A (en) | multi-task processing method, application server and storage medium | |
CN109818810A (en) | A kind of access server connection optimization method, access server and communication system | |
CN107704546A (en) | Page configuration method and server | |
CN106357791A (en) | Method, device and system for processing services | |
CN107864187A (en) | The online task executing method of terminal device and server | |
CN108153877A (en) | Data dictionary methods of exhibiting, device, terminal device and storage medium | |
CN107704331A (en) | Electrical equipment fault analyzes and processes householder method and device | |
CN107786308B (en) | Data transmission method and terminal device | |
CN110417789A (en) | Server connection method, electronic equipment, system and medium | |
CN109857579A (en) | A kind of data processing method and relevant apparatus | |
CN110389976A (en) | A kind of dispatching method and device of multi-interface data | |
CN107292614A (en) | Pay class application management method, device and mobile terminal | |
CN107729407A (en) | User behavior analysis method and server | |
CN108512688A (en) | Network node configuration method and terminal | |
CN109684115A (en) | A kind of communication means and relevant device applied between plug-in unit | |
CN109859038A (en) | A kind of take-effective method and device of block chain intelligence contract |
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: 20180706 |
|
RJ01 | Rejection of invention patent application after publication |