CN109445929A - A kind of method and system of scheduler task - Google Patents
A kind of method and system of scheduler task Download PDFInfo
- Publication number
- CN109445929A CN109445929A CN201811367759.8A CN201811367759A CN109445929A CN 109445929 A CN109445929 A CN 109445929A CN 201811367759 A CN201811367759 A CN 201811367759A CN 109445929 A CN109445929 A CN 109445929A
- Authority
- CN
- China
- Prior art keywords
- task
- workflow
- sub
- module
- triggered time
- 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
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000001960 triggered effect Effects 0.000 claims abstract description 56
- 230000002688 persistence Effects 0.000 claims description 6
- 238000007689 inspection Methods 0.000 claims description 3
- 235000019580 granularity Nutrition 0.000 description 14
- 230000007246 mechanism Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 7
- 230000000737 periodic effect Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000003442 weekly effect Effects 0.000 description 2
- PEDCQBHIVMGVHV-UHFFFAOYSA-N Glycerine Chemical compound OCC(O)CO PEDCQBHIVMGVHV-UHFFFAOYSA-N 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
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)
Abstract
The invention discloses a kind of method and systems of scheduler task.A kind of method of scheduler task, comprising: for reaching the first task in its triggered time, check the triggered time of the second task of the preceding sequence task as the first task;If second task arrived its triggered time, second task is executed, otherwise is set as being completed by second task.
Description
Technical field
The present invention relates to computer technologies, can particularly support in big data platform across periodic scheduling task
Method and apparatus.
Background technique
Under the analysis of big data and application scenarios, due to the time of data and different tasks to separate sources
It is required that and information response require different and also flexible and changeable to the resource input scheme of different task, therefore, it is difficult to use
Certain single period meets the individual demand of the task in entire workflow.Wherein, workflow is defined based on user
Task inside node dependence, task schedule execute when execution process.
For example, there is the scheme of the task schedule of single time granularity all tasks to be required to meet minimum for traditional use
The time granularity of task schedule, and the task with longer cycle will be split into the task with the shorter period;It should
Task scheduling approach also requires the actual motion of task to must satisfy the predefined sequencing of workflow, the tune of each workflow
Degree can all execute according to predefined sequence and consume corresponding resource.
In addition, in existing technical solution, due to limiting the time granularity of task schedule, in task schedule
When can only be using the minimum time granularity in entire workflow.In this way, when workflow changes, if there is when
Between change in granularity, especially there is smaller time granularity, then require task all in entire workflow that will become
The setting in more period, otherwise task can not execute.Meanwhile partial task needs the longer execution time.If mandatory requirement is adopted
With short-period scheduling scheme, it will cause the collapses of the even entire scheduling system of the accumulation of task, workflow schedule failure.This
Outside, the sequencing of task run must be realized in terms of the dependence of task.Since sequence task may be multiple before part
Result is consistent after execution, therefore compulsory scheduling meeting consumes hardware resource and the working time of system, to cause
The waste of system resource.
It can be seen that due between task there are dependence and each task is there are difference, using passing
When dispatching method (including the dispatching method using single time granularity) of system, the wave of time and system resource is not only resulted in
Take, the restriction that the scheme of task schedule is had to by the executive capability of tasks certain in entire workflow, and will lead to whole
A system can not flexibly adapt to job change, or even will appear the collapse of system when serious.
Summary of the invention
According to an aspect of the present invention, a kind of method of scheduler task may include: for reaching its triggered time
First task checks the triggered time of the second task of the preceding sequence task as the first task;And if described second
Business arrived its triggered time, then executes second task, otherwise be set as being completed by second task.
Before inspection operation, the first task and second task are defined, is then parsed described first
The dependence of business and second task.
The defining operation includes: to create the first task and second task;It determines and executes the first task
The resource wanted with second required by task;It will data persistence relevant to the first task and second task;With
And the legitimacy of the verifying first task and second task.
The defining operation further includes for the first task and the second task setting respective triggered time and holding
Row sequence.
The step of dependence for parsing the first task and second task includes: that acquisition is described first
Business and second task triggered time and execute sequence;And generating includes the first task and second task
Workflow.
According to an aspect of the present invention, a kind of method of scheduler task may include: for not reaching its triggered time
A task, the state of the task is set as being completed;And the rear sequence task of the scheduling task.
According to an aspect of the present invention, a kind of method for dispatching at least two tasks may include: that (1) parsing is described extremely
Dependence between few two tasks;(2) according to the dependence, a workflow is generated;(3) workflow is split
At at least one sub- workflow;(4) it selects and executes one at least one the described sub- workflow son work not being performed
Stream;(5) judge whether the sub- workflow that is selected and executing runs succeeded, and if sub- workflow execution success
(7) are entered step, (6) are otherwise entered step;(6) judge whether to need to run sub- workflow that is described selected and executing again, such as
Fruit needs to run sub- workflow that is described selected and executing again, then enters step (4), otherwise scheduling fails and terminates to dispatch;With
And (7) judge whether that all sub- workflows at least one described sub- workflow are carried out completion, if all sub- works
It has been carried out as stream, has terminated to dispatch, otherwise entered step (4).
Every sub- workflow at least one described sub- workflow has Unidirectional chain-type structure.
Dependence between at least two task can be expressed as tree.
The step (4) includes: that (a) starts the execution of the sub- workflow and dispatch the starting times of the sub- workflow
Business;(b) task in the sub- workflow is dispatched, including generating an example for the scheduled task;(c) judge whether to
Up to the triggered time of the scheduled task, entered step if the triggered time that arrived the scheduled task
(e), otherwise (d) is entered step;(d) example is set as being completed, and enters step (f);(e) example is executed,
(f) is entered step if the example runs succeeded, terminates holding for the sub- workflow if the example executes failure
Row;(f) judge whether all tasks of the sub- workflow are carried out completion, tied if all tasks are carried out completion
The execution of the sub- workflow of Shu Suoshu, otherwise enters step (g);And (g) using the rear sequence task of the scheduled task as
Being scheduled for task, enters step (b).
According to an aspect of the present invention, when a kind of system of scheduler task may include: for for reaching its triggering
Between first task, check as the first task preceding sequence task the second task triggered time module;If for
Second task arrived its triggered time, then executes the module of second task;If do not arrived for second task
Up to its triggered time, then completed empty race setup module is set by second task.
The system also includes: task definition module is using first be used for for reaching its triggered time
Task, check as the first task preceding sequence task the second task triggered time module before, definition described first
Task and second task;And parsing module is relied on, and after defining the first task and second task, solution
Analyse the dependence of the first task and second task.
The task definition module further include: for creating the module of at least two task;Institute is executed for determining
State first task and the module of resource that second required by task is wanted;For will data relevant at least two task
The module of persistence;And the module of the legitimacy for verifying at least two task created.
The task definition module further include: for being the first task and the respective triggering of the second task setting
The module of time and execution sequence.
The dependence parsing module further include: for obtain the first task and second task triggered time and
The module of execution sequence;And the module for generating the workflow including the first task and second task.
According to an aspect of the present invention, a kind of system of scheduler task may include: for for not reaching its triggering
The state of the task is set completed module by the task of time;And the rear sequence task for dispatching the task
Module.
According to an aspect of the present invention, a kind of system for dispatching at least two tasks may include: (1) for parsing institute
State the module of the dependence between at least two tasks;(2) for generating the mould of a workflow according to the dependence
Block;(3) for the workflow to be split into the module of at least one sub- workflow;(4) described in being used to select and execute at least
The module of one in the one sub- workflow sub- workflow not being performed;(5) for judging son work that is selected and executing
Whether stream runs succeeded, and enters step (7) if the sub- workflow execution success, otherwise enters step the module of (6);
(6) for judging whether to need to run sub- workflow that is described selected and executing again, if necessary to run described selected and hold again
Capable sub- workflow, then enter step (4), and otherwise scheduling fails and terminates the module of scheduling;And (7) are used to judge whether institute
All sub- workflows stated at least one sub- workflow are carried out completion, tie if all sub- workflows have been carried out
Beam scheduling, otherwise enters step the module of (4).
Every sub- workflow at least one described sub- workflow has Unidirectional chain-type structure.
Dependence between at least two task can be expressed as tree.
For selecting and executing the module packet of a sub- workflow not being performed at least one described sub- workflow
Include: (a) for start the execution of the sub- workflow and dispatch the sub- workflow initial task module;(b) for adjusting
The task in the sub- workflow is spent, the module including generating an example for the scheduled task;(c) for judging whether
The triggered time for reaching the scheduled task enters step if the triggered time that arrived the scheduled task
(e), the module of (d) is otherwise entered step;(d) for the example to be set as being completed, and the module of (f) is entered step;
(e) for executing the example, (f) is entered step if the example runs succeeded, if the example executes failure
Terminate the module of the execution of the workflow;(f) for judging whether all tasks of the sub- workflow are carried out completion, such as
All tasks described in fruit are carried out the execution for completing then to terminate the sub- workflow, otherwise enter step the module of (g);And
(g) for entering step the module of (b) using the rear sequence task of the scheduled task as being scheduled for task.
According to an aspect of the present invention, a kind of computer-readable medium is stored thereon with computer-readable instruction, described
Method as described above is able to carry out when computer-readable instruction is computer-executed.
Across periodic scheduling task is used in the disclosure and separates the execution state of task with practical process performing
Thought, by using task sky run mechanism to match the dependence of the task schedule between different cycles and solve task
The difficulty of scheduling.Especially in the task definition phase, appointing with multiple and different time granularities, can be set in workflow
Business, so as to make full use of the resource of system, and reduces unnecessary task schedule, in order to avoid cause the waste of resource.
In addition, in the disclosure, in the execution stage of task, the system across periodic scheduling task is in parsing workflow
After period, there will be macrocyclic task to be provided directly as empty race in the non-toggle time, so that it is short to guarantee to rely on having for it
The task in period normally can run and dispatch.Therefore, this has ensured that each task in entire workflow is actually pressed
It runs and dispatches according to the scheduled period.
Therefore, the embodiment of the present invention realizes the method and system across periodic scheduling task.The embodiment of the present invention exists
The period more abundant can be supported in terms of time granularity, can support the task for the time granularity for having different it is mutual according to
Rely, it may also be ensured that the correctness (not destroying the preset period) dispatched between the task with different cycles.
Detailed description of the invention
Fig. 1 shows the workflow according to an embodiment of the present invention that there is the task schedule demand across the period.
Fig. 2A shows the flow chart of the workflow of execution task according to an embodiment of the present invention.
Fig. 2 B shows the process of sub- workflow included in the workflow of execution task according to an embodiment of the present invention
Figure.
Fig. 3 shows the sub- workflow obtained after the workflow according to an embodiment of the present invention by Fig. 1 is split.
Fig. 4 shows the workflow according to an embodiment of the present invention for triggering and emptying and running function.
Specific embodiment
The contents of the present invention are discussed now with reference to several exemplary embodiments.It should be appreciated that discussing these implementations
Example is rather than dark merely to better understood when those of ordinary skill in the art and therefore realize the contents of the present invention
Show any restrictions to the scope of the present invention.
As used herein, term " includes " and its variant will be read as meaning opening " including but not limited to "
Put formula term.Term "based" will be read as " being based at least partially on ".Term " one embodiment " and " a kind of embodiment "
It is read as " at least one embodiment ".Term " another embodiment " will be read as " at least one other embodiment ".
Herein, " task execution period " referred to as " period ", and can be scheduled operation to some task and be properly termed as generating
" example " of the task.
In addition, herein, " the preceding sequence task " of the task in a workflow refers in executing the workflow
Tasks to be performed is needed before the task.Herein, " the rear sequence task " of the task in a workflow refers to
Executing needs tasks to be performed after the task in the workflow.
The embodiment of the present invention solves the tradition in big data platform by the way of having across periodic scheduling task and appoints
The problems in business dispatching method.According to one embodiment, the system across periodic scheduling task includes three modules: task definition mould
Block relies on parsing module and empty race setup module.
Task definition module
Task definition module can define the task across the period.The defining operation generally includes creation task, determination is held
Resource that row required by task is wanted (such as the CPU processing time, memory headroom, external memory space, network bandwidth, in database
Data source etc.) and will data persistence related with task, and verifying creation task legitimacy etc..Wherein, persistently
Change refer to by task data be saved in can persistence storage equipment (such as in disk).User can be in the rank of the task of definition
Section definition in workflow has the task of different cycles, and with macrocyclic task and has between short-period task
It can be in any combination.
Task definition module provides the period with different time granularity.Wherein, the period refers to execute every time and appoint
The time interval of business.Wherein, the time granularity refers to the unit in the period, for example, time granularity include the moon, it is week, day, small
When, minute rank.Task can be individually defined, the period of the task without being relied on by the task is limited.
It, can be according to the details for the data that task is included and the function of being realized for task when across period definition task
It is required that etc. formulate the different periods, and can also by the integrated planning to task to be processed, realize to hardware and
The reasonable distribution of time resource.
For example, as shown in Figure 1, it is the workflow that typically there is the task schedule demand across the period.In Fig. 1
In, A task can be that a resource consumption is larger or data are updated than task less frequently, for B task is with respect to A task
With higher real-time.
Rely on parsing module
In task execution, relying on parsing module be can parse in tree-shaped task dependence, obtain wherein each
It is engaged in the dependence in terms of execution and in the sequence for the task schedule being not present under the workflow of loop and branch.According to this
Invention one embodiment, resolving use the ergodic algorithm (for example, DFS algorithm) of tree, and a workflow W is disassembled
At multiple sub- workflows (W1, W2 ...) of unidirectional chain structure.The unidirectional chain structure refers in sub- workflow
Logical relation between task.
Resolving in this way, available requirement and work in different task executions to preceding sequence task
The complete implementation procedure of stream.
To rely on parsing module can also run in task execution to check dependence, the available current task that arrives
The period of preceding sequence task and execution state, in order to be arranged during subsequent based on task sky race mechanism is mentioned below
The empty race state of task.
After the parsing for the completing to be included to workflow of the task, it can determine triggered task after each dismantling
Workflow in sequence, to provide convenience in the follow-up process to empty the operation of race.
Sky runs setup module
The embodiment of the present invention uses task sky and runs mechanism, which runs a logic of mechanism are as follows: when a task
(typically referring to have relatively macrocyclic task) does not reach the triggered time of the task, but the postorder for relying on the task is appointed
Business is when reaching the triggered time corresponding to the period of the rear sequence task, by the state of the task is set as being completed (that is,
Referred to as " empty race ") and not practical execution task, to guarantee that the rear sequence task for relying on the task can be according to normal side
Formula is scheduled.Wherein, the triggered time, which refers to, should execute the specific time point of task in the period.For example, there are one
Task, triggered time are 2 points on every Sundays, then its period is weekly, time granularity is week.
Another logic of task sky race mechanism are as follows: when a task does not reach the triggered time of the task, by the task
State be set as being completed, and dispatch after sequence task.
In the disclosure, when starting across period execution task, the dependence by parsing task obtains each task
Triggered time and execute sequence.For example, as described above, when the task does not reach its triggered time but appoints dependent on its postorder
Business reaches the triggered time, which can will be emptied race by empty race mechanism.Task can be guaranteed according to the sequence of workflow in this way
It completes to execute.
Task is set as being completed in addition, running mechanism using task sky, also ensure each task check its according to
When the state of bad task (that is, preceding sequence task), do not need the executive condition for analyzing its preceding sequence task, and only need to obtain its according to
The state of bad task.Wherein, the state of task includes that task has executed completion and task execution failure.Wherein, task is held
Market condition includes that task is carrying out and is not carried out with task.
According to one embodiment of present invention, mechanism can be run using task sky and handles the workflow in Fig. 1.For example, logical
It crosses and mechanism is run using task sky to A task, when the triggering of B task, do not need to execute A task really, but directly appoint A
Business is set as being completed in the process as A- > B.This ensure that B task can be executed normally, and A task from
Body executive condition is unaffected.The embodiment of the present invention further includes that its differently composed module can complete Fig. 1 and include and/or imply
Each step system.
Fig. 2A and 2B is the workflow of execution task according to an embodiment of the invention and the flow chart of sub- workflow.
Wherein, Fig. 2A includes parsing at the beginning of scheduling to the dependence of task, and including in the process of implementation to work
The performance for making stream and sub- workflow is judged.Method shown in B according to fig. 2 according to the definition to the period and can appoint
The performance of business needs actual motion determining the task or is provided directly as empty race state.The embodiment of the present invention is also
The system of each step in the flow chart of Fig. 2A and 2B can be completed including its differently composed module.
In the embodiment shown in Fig. 2A, the method for executing workflow includes the following steps:
(1) start the execution of tree-shaped workflow.
(2) the tree-shaped workflow is split into multiple sub- workflows for Unidirectional chain-type structure.
(3) it selects and executes the sub- workflow not being performed.
(4) judge whether the sub- workflow runs succeeded, if success if enter step (6), if unsuccessful into
Enter step (5).
(5) judge whether to need to run the sub- workflow again, if necessary to run the sub- workflow again, then enter step
(3), it otherwise executes failure and terminates to execute.
(6) judge whether that all sub- workflows in the tree-shaped workflow have been carried out, if all sub- workflows are all
It has been executed that, enter step (7), otherwise entered step (3).In an embodiment of the present invention, it can work the son being performed
The label of stream setting one " execution ".
(7) it completes the execution of tree-shaped workflow and terminates the execution.
Wherein, workflow shown in FIG. 1 is tree-shaped workflow, and workflow shown in Fig. 3 is the work of Unidirectional chain-type structure
Stream.
The execution of sub- workflow according to an embodiment of the invention is further described in fig. 2b:
(1) execution of promoter workflow and the initial task of the sub- workflow is dispatched.
(2) example is generated for the scheduled task in the sub- workflow.
(3) it in the triggered time for judging whether to reach the task, is entered step if the triggered time for having arrived the task
(5), if not arriving the triggered time of the task, (4) are entered step.
(4) it sets empty for the example and runs (being set as being completed), and enter step (6).
(5) example is executed, (6) are entered step if the example runs succeeded, if the example executes mistake
It loses, enters step (9).
(6) judge whether all tasks of sub- workflow are carried out completion, enter if all tasks are carried out completion
Step (8), otherwise enters step (7).
(7) using the rear sequence task of the scheduled task as being scheduled for task, and (2) are entered step.
(8) sub- workflow execution is completed and is terminated.
(9) sub- workflow execution fails and terminates.
Wherein, the initial task refers to the task for not depending on other tasks in a workflow.
In addition, according to an embodiment of the present invention, workflow shown in FIG. 1 can be torn open according to the dependence of task
It is divided into sub- workflow as shown in Figure 3.Wherein, three sub- workflows of Fig. 3, are generated by logic below respectively:
The content that (1) first sub- workflow indicates is: being configured to dispatch D to A.Since D with the A period is identical
(period of the two is week), and the triggered time of D is later than A, so after the completion of A task, then executing D task is correctly to flow
Journey.
The content that (2) second sub- workflows indicate is: being configured to dispatch B to A.Since B is to run daily, A
The preceding sequence task of B, then in the sub- workflow of second generated, A be set as checking daily it is primary, when A is not at the triggered time,
A is emptied into race, actually A is not executed.The period of C is longer than B in the sub- workflow, so C waits A, B to complete to hold again after checking
Row is correct process.
(3) content that the sub- workflow of third indicates is: being configured to dispatch C to A.Although due to C with A period phase
Together, but in same period (such as in one week, will be on every Sundays as one week from date), triggered time of C earlier than
A, then A can be done on the triggered time of C once checks and be set to null race, to guarantee that A is successful when C is dispatched.At this point,
Since the period of B is less than C, then B can be done primary inspection on the triggered time of C, and due to the B in the second sub- workflow
It has been run succeeded that, therefore B is directly emptied into race.
Wherein, each task is claimed with letter generation, as A task is referred to as A;In Fig. 3, defined according to the sequence up and down in figure
For the first sub- workflow, the second sub- workflow and the sub- workflow of third;Wherein, the first sub- workflow corresponds to the work of A and D task
It flows, the sub- workflow of workflow, third that the second sub- workflow corresponds to A, B and C task corresponds to the work of A, B and C task
Stream.The embodiment of the present invention further includes that its differently composed module can complete the system of each step that Fig. 3 includes and/or implies.
The workflow of another embodiment of the invention is as shown in figure 4, the task (B task) wherein executed daily depends on
The performance of the task (A task) executed weekly.When reaching the triggered time of B every time, will according to following two situation into
Row operation:
(1) if the triggered time is Wednesday, according to the conventional successive in workflow, A task is first carried out, completes A task
B task is executed afterwards;
(2) if the triggered time is not Wednesday, mechanism is run according to task sky and is configured.For example, when A task last time holds
When row state is successfully, A task is emptied into race, skips the execution stage of A task, and starts to execute B task.
This ensure that in actual operation, the practical only B task of really running daily for task, thus realize by
The function that the actual needs of task is scheduled.The embodiment of the present invention further includes that its differently composed module can complete Fig. 4 packet
The system for each step for containing and/or implying.
The method and system of various embodiments of the present invention can be implemented as pure software and (such as be write with Java language
Software program, and the Java Runtime Environment based on JRE8 and the above version), it also can according to need and be embodied as pure hardware
(such as dedicated asic chip or fpga chip), the system for being also implemented as combining software and hardware (such as are stored with solid
Determine the fixer system of code).
Another aspect of the present invention is a kind of computer-readable medium, is stored thereon with computer-readable instruction, described
Instruct the method for being performed implementable various embodiments of the present invention.
Various embodiments of the present invention are described above, above description is exemplary, and non-exclusive, and
It is not limited to the disclosed embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill
Many modifications and changes are obvious for the those of ordinary skill in art field.The range of claimed theme only by
The attached claims are defined.
Claims (21)
1. a kind of method of scheduler task, comprising:
For reaching the first task in its triggered time, the triggering of the second task of the preceding sequence task as the first task is checked
Time;With
If second task arrived its triggered time, second task is executed, otherwise sets second task to
It is completed.
2. according to the method described in claim 1, wherein, before inspection operation, the first task and described is defined
Then second task parses the dependence of the first task and second task.
3. according to the method described in claim 2, wherein, the defining operation includes:
Create the first task and second task;
Determine the resource that the execution first task and second required by task are wanted;
It will data persistence relevant to the first task and second task;With
Verify the legitimacy of the first task and second task.
4. according to the method described in claim 2, wherein, the defining operation further includes for the first task and described second
The task setting respective triggered time and execute sequence.
5. according to the method described in claim 4, wherein, the dependence of the parsing first task and second task is closed
The step of being include:
It obtains the triggered time of the first task and second task and executes sequence;With
Generate the workflow including the first task and second task.
6. a kind of method of scheduler task, comprising:
For not reaching a task in its triggered time, the state of the task is set as being completed;With
Dispatch the rear sequence task of the task.
7. a kind of method for dispatching at least two tasks, comprising:
(1) dependence between at least two task is parsed;
(2) according to the dependence, a workflow is generated;
(3) workflow is split into at least one sub- workflow;
(4) it selects and executes a sub- workflow not being performed at least one described sub- workflow;
(5) judge whether the sub- workflow that is selected and executing runs succeeded, and if sub- workflow execution success
(7) are then entered step, (6) are otherwise entered step;
(6) judge whether to need to run sub- workflow that is described selected and executing again, if necessary to run described selected and hold again
Capable sub- workflow, then enter step (4), and otherwise scheduling fails and terminates to dispatch;With
(7) judge whether that all sub- workflows at least one described sub- workflow are carried out completion, if all sons
Workflow has been carried out, and terminates to dispatch, and otherwise enters step (4).
8. according to the method described in claim 7, wherein, every sub- workflow at least one described sub- workflow has single
To chain structure.
9. according to the method described in claim 7, wherein, the dependence between at least two task can be expressed as setting
Shape structure.
10. according to the method described in claim 7, wherein, the step (4) includes:
(a) start the execution of the sub- workflow and dispatch the initial task of the sub- workflow;
(b) task in the sub- workflow is dispatched, including generating an example for the scheduled task;
(c) judge whether to reach the triggered time of the scheduled task, if arrived the touching of the scheduled task
The hair time then enters step (e), otherwise enters step (d);
(d) example is set as being completed, and enters step (f);
(e) example is executed, enters step (f) if the example runs succeeded, if the example executes failure
Terminate the execution of the sub- workflow;
(f) judge whether all tasks of the sub- workflow are carried out completion, if all tasks are carried out completion
The execution for terminating the sub- workflow, otherwise enters step (g);And
(g) it using the rear sequence task of the scheduled task as being scheduled for task, enters step (b).
11. a kind of system of scheduler task, comprising:
For the first task for reaching its triggered time, the second task of the preceding sequence task as the first task is checked
The module in triggered time;
If arrived its triggered time for second task, the module of second task is executed
If not reaching its triggered time for second task, completed empty run is set by second task and is arranged
Module.
12. system according to claim 11, further includes:
Task definition module, using the first task be used for for reaching its triggered time, check be used as this first
Before the module in the triggered time of the second task of the preceding sequence task of task, the first task and second task are defined;
And
Parsing module is relied on, after defining the first task and second task, parses the first task and institute
State the dependence of the second task.
13. system according to claim 12, wherein the task definition module further include:
For creating the module of at least two task;
Module for the resource that the determining execution first task and second required by task are wanted;
For by the module of data persistence relevant at least two task;With
For verifying the module of the legitimacy of at least two task created.
14. system according to claim 12, wherein the task definition module further include:
For the module for the first task and second task setting respective triggered time and execution sequence.
15. system according to claim 14, wherein the dependence parsing module further include:
For obtaining the triggered time of the first task and second task and the module of execution sequence;With
For generating the module of the workflow including the first task and second task.
16. a kind of system of scheduler task, comprising:
For the task for not reaching its triggered time, completed module is set by the state of the task;And
For dispatching the module of the rear sequence task of the task.
17. a kind of system for dispatching at least two tasks, comprising:
(1) for parsing the module of the dependence between at least two task;
(2) for generating the module of a workflow according to the dependence;
(3) for the workflow to be split into the module of at least one sub- workflow;
(4) for selecting and executing the module of a sub- workflow not being performed at least one described sub- workflow;
(5) for judging whether sub- workflow that is selected and executing runs succeeded, and if the sub- workflow execution success
(7) are then entered step, the module of (6) is otherwise entered step;
(6) described selected if necessary to run again for judging whether to need to run sub- workflow that is described selected and executing again
And the sub- workflow executed, then (4) are entered step, otherwise scheduling fails and terminates the module of scheduling;With
(7) for judging whether that all sub- workflows at least one described sub- workflow are carried out completion, if the institute
There is sub- workflow to be carried out, terminate to dispatch, otherwise enters step the module of (4).
18. system according to claim 17, wherein every sub- workflow at least one described sub- workflow has
Unidirectional chain-type structure.
19. system according to claim 17, wherein the dependence between at least two task can be expressed as
Tree.
20. system according to claim 17, wherein for selecting and executing one at least one described sub- workflow
The module of a sub- workflow not being performed includes:
(a) for start the execution of the sub- workflow and dispatch the sub- workflow initial task module;
(b) for dispatching the task in the sub- workflow, the module including generating an example for the scheduled task;
(c) it is used to judge whether to reach the triggered time of the scheduled task, if arrived the scheduled task
Triggered time then enter step (e), otherwise enter step the module of (d);
(d) for the example to be set as being completed, and the module of (f) is entered step;
(e) for executing the example, (f) is entered step if the example runs succeeded, if the example executes mistake
It loses, terminates the module of the execution of the workflow;
(f) for judging whether all tasks of the sub- workflow are carried out completion, if all tasks have been carried out
At the execution for then terminating the sub- workflow, the module of (g) is otherwise entered step;With
(g) for entering step the module of (b) using the rear sequence task of the scheduled task as being scheduled for task.
21. a kind of computer-readable medium is stored thereon with computer-readable instruction, the computer-readable instruction is by computer
The method as described in one of any in claim 1-10 is able to carry out when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811367759.8A CN109445929A (en) | 2018-11-16 | 2018-11-16 | A kind of method and system of scheduler task |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811367759.8A CN109445929A (en) | 2018-11-16 | 2018-11-16 | A kind of method and system of scheduler task |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109445929A true CN109445929A (en) | 2019-03-08 |
Family
ID=65553710
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811367759.8A Pending CN109445929A (en) | 2018-11-16 | 2018-11-16 | A kind of method and system of scheduler task |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109445929A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110109764A (en) * | 2019-05-15 | 2019-08-09 | 重庆天蓬网络有限公司 | Delayed tasks creation method, device, medium and electronic equipment |
CN110928653A (en) * | 2019-10-24 | 2020-03-27 | 浙江大搜车软件技术有限公司 | Cross-cluster task execution method and device, computer equipment and storage medium |
CN111506659A (en) * | 2020-04-20 | 2020-08-07 | 杭州数澜科技有限公司 | Data synchronization method, system and medium |
CN112445600A (en) * | 2020-12-15 | 2021-03-05 | 北京首汽智行科技有限公司 | Method and system for issuing offline data processing task |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101567013A (en) * | 2009-06-02 | 2009-10-28 | 阿里巴巴集团控股有限公司 | Method and apparatus for implementing ETL scheduling |
CN102508716A (en) * | 2011-09-29 | 2012-06-20 | 用友软件股份有限公司 | Task control device and task control method |
GB2526083A (en) * | 2014-05-11 | 2015-11-18 | Safetty Systems Ltd | A framework as well as method for developing time-triggered computer systems with multiple system modes |
CN105786611A (en) * | 2014-12-16 | 2016-07-20 | 中国移动通信集团公司 | Method and device for task scheduling of distributed cluster |
-
2018
- 2018-11-16 CN CN201811367759.8A patent/CN109445929A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101567013A (en) * | 2009-06-02 | 2009-10-28 | 阿里巴巴集团控股有限公司 | Method and apparatus for implementing ETL scheduling |
CN102508716A (en) * | 2011-09-29 | 2012-06-20 | 用友软件股份有限公司 | Task control device and task control method |
GB2526083A (en) * | 2014-05-11 | 2015-11-18 | Safetty Systems Ltd | A framework as well as method for developing time-triggered computer systems with multiple system modes |
CN105786611A (en) * | 2014-12-16 | 2016-07-20 | 中国移动通信集团公司 | Method and device for task scheduling of distributed cluster |
Non-Patent Citations (2)
Title |
---|
ANDREW S. TANENBAUM: "《结构化计算机组成》", 31 October 2001, 机械工业出版社 * |
李金忠: "网格工作流调度关键技术综述", 《井冈山学院学报(自然科学)》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110109764A (en) * | 2019-05-15 | 2019-08-09 | 重庆天蓬网络有限公司 | Delayed tasks creation method, device, medium and electronic equipment |
CN110928653A (en) * | 2019-10-24 | 2020-03-27 | 浙江大搜车软件技术有限公司 | Cross-cluster task execution method and device, computer equipment and storage medium |
CN110928653B (en) * | 2019-10-24 | 2022-10-21 | 浙江大搜车软件技术有限公司 | Cross-cluster task execution method and device, computer equipment and storage medium |
CN111506659A (en) * | 2020-04-20 | 2020-08-07 | 杭州数澜科技有限公司 | Data synchronization method, system and medium |
CN112445600A (en) * | 2020-12-15 | 2021-03-05 | 北京首汽智行科技有限公司 | Method and system for issuing offline data processing task |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109445929A (en) | A kind of method and system of scheduler task | |
CN112214289B (en) | Task scheduling method and device, server and storage medium | |
Yalcinkaya et al. | An exact schedulability test for non-preemptive self-suspending real-time tasks | |
US9063778B2 (en) | Fair stateless model checking | |
US20080282246A1 (en) | Compiler aided ticket scheduling of tasks in a computing system | |
US10514949B1 (en) | Efficient data processing in a serverless environment | |
CN110471754B (en) | Data display method, device, equipment and storage medium in job scheduling | |
CN111861235A (en) | Task flow arrangement method and device and electronic equipment | |
Marchetti-Spaccamela et al. | On the complexity of conditional DAG scheduling in multiprocessor systems | |
CN108958915A (en) | Timed task executes method and device | |
CN110019144A (en) | A kind of method and system of big data platform data O&M | |
US20230101571A1 (en) | Devices, methods, and media for efficient data dependency management for in-order issue processors | |
CN109992509A (en) | The automated execution method, apparatus of test case, electronic equipment | |
US7451132B2 (en) | System and method for production planning utilizing on-line state-space planning | |
CN111201513B (en) | Method for executing a sort plan ensuring low latency communication between real-time tasks | |
CN113268332B (en) | Continuous integration method and device | |
Prayati et al. | A methodology for the development of distributed real-time control applications with focus on task allocation in heterogeneous systems | |
US20090158289A1 (en) | Workflow execution plans through completion condition critical path analysis | |
CN111190725B (en) | Task processing method, device, storage medium and server | |
CN112346842A (en) | Workflow task scheduling method based on directed acyclic graph | |
Srinivasan et al. | Response-time analysis for limited-preemptive self-suspending and event-driven delay-induced tasks | |
CN110046809B (en) | Job scheduling method and device | |
CN112363819A (en) | Big data task dynamic scheduling method and device and computing equipment | |
Christmann et al. | Priority scheduling in SDL | |
Thaden | Semi-automatic optimization of hardware architectures in embedded systems |
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 |