CN110609784A - Task scheduling method and system, storage medium and electronic device - Google Patents
Task scheduling method and system, storage medium and electronic device Download PDFInfo
- Publication number
- CN110609784A CN110609784A CN201810619940.7A CN201810619940A CN110609784A CN 110609784 A CN110609784 A CN 110609784A CN 201810619940 A CN201810619940 A CN 201810619940A CN 110609784 A CN110609784 A CN 110609784A
- Authority
- CN
- China
- Prior art keywords
- task
- time
- tested
- scheduling
- test
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 92
- 238000012360 testing method Methods 0.000 claims abstract description 152
- 238000012544 monitoring process Methods 0.000 claims description 7
- 230000001960 triggered effect Effects 0.000 claims description 4
- 230000002123 temporal effect Effects 0.000 claims 2
- 230000008569 process Effects 0.000 abstract description 12
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000012423 maintenance Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 230000010354 integration Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000013479 data entry Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000013522 software testing Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3628—Software debugging of optimised code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a task scheduling method, which comprises the following steps: under the condition of entering a current scheduling period, acquiring a time strategy corresponding to each task to be tested; analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task; and respectively scheduling each target test task for testing in the current scheduling period. According to the task scheduling method provided by the invention, when a new scheduling period is entered, the time strategy corresponding to each task to be tested is analyzed, each task to be tested which needs to be analyzed in the current new scheduling period is determined as a target test task, and each target test task is sequentially subjected to scheduling test, so that the scheduling test of a plurality of tasks to be tested in the same scheduling period is realized, in the realization process, the repeated writing of timer codes is avoided, and the codes and system resources are saved.
Description
Technical Field
The present invention relates to the field of software testing, and in particular, to a task scheduling method and system, a storage medium, and an electronic device.
Background
With the rapid development of information technology, large software systems need to be upgraded continuously to meet the diversified demands of users on information. In the course of performing a software upgrade, to ensure that the upgraded software can operate normally, it is usually necessary to perform a regression test on the upgraded software to confirm that no new errors have been introduced by code modification or that other code has been made errors. Through regression testing, the cost of the system in stages of testing, maintenance and upgrading and the like can be greatly reduced.
During the software testing process, regression testing is required to be carried out at each stage of software development, in gradual and rapid iterative development, the regression testing is more frequent due to continuous release of a new version, and in an extreme programming method, the regression testing is required to be carried out for a plurality of times every day, so that it is very meaningful to improve the efficiency and effectiveness of the regression testing by selecting a correct regression testing strategy.
In the conventional regression testing process, in order to ensure that each test task can be tested in time, a corresponding timer is generally set for each test task, and the test tasks are triggered at regular time to perform regression testing.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a task scheduling method, which can perform scheduling test on a plurality of different tasks to be tested without repeatedly compiling codes and save the codes and system resources.
The invention also provides a task scheduling system which is used for ensuring the realization and the application of the method in practice.
A task scheduling method comprises the following steps:
under the condition of entering a current scheduling period, acquiring a time strategy corresponding to each task to be tested;
analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task;
and respectively scheduling each target test task for testing in the current scheduling period.
The method described above, optionally before performing the method, further includes:
and monitoring the trigger time of each scheduling period, and triggering to enter the current scheduling period when the trigger time of the current scheduling period is monitored.
Optionally, in the above method, the time policy adopts a multi-level time format; the time strategy is formed by combining numerical values corresponding to each level of time with different wildcards and connectors.
Optionally, in the method, analyzing the time policy corresponding to each task to be tested includes:
according to the composition format of the time strategy, sequentially determining the time point represented by each level of time format in the time strategy;
and combining the time points represented by each level of time format to determine the corresponding test execution time of each test task.
Optionally, the method for determining a task to be tested, which needs to be tested in a current scheduling period, as a target test task includes:
determining a scheduling time period corresponding to the current scheduling period;
and respectively matching the test execution time corresponding to each task to be tested with the scheduling time period, and determining the task to be tested with the test execution time existing in the scheduling time period as a target test task.
A task scheduling system comprising: a test platform and a task scheduler;
the task scheduler is used for acquiring a time strategy corresponding to each task to be tested under the condition of entering a current scheduling period; analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task; and respectively scheduling each target test task to test in the test platform in the current scheduling period.
The above system, optionally, further includes: a timer;
the timer is used for monitoring the trigger time of each scheduling period, and when the trigger time of the current scheduling period is monitored, the current scheduling period is triggered to enter.
Optionally, in the system described above, the test platform is configured to configure a corresponding time policy for each task to be tested.
A storage medium, the storage medium comprising stored instructions, wherein when the instructions are executed, a device on which the storage medium is located is controlled to execute the task scheduling method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the task scheduling method described above.
Compared with the prior art, the invention has the following advantages:
the invention provides a task scheduling method, which comprises the following steps: under the condition of entering a current scheduling period, acquiring a time strategy corresponding to each task to be tested; analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task; and respectively scheduling each target test task for testing in the current scheduling period. According to the task scheduling method provided by the invention, when a new scheduling period is entered, the time strategy corresponding to each task to be tested is analyzed, each task to be tested which needs to be analyzed in the current new scheduling period is determined as a target test task, and each target test task is sequentially subjected to scheduling test, so that the scheduling test of a plurality of tasks to be tested in the same scheduling period is realized, in the realization process, the repeated writing of timer codes is avoided, and the codes and system resources are saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will describe the embodiments
In which reference is made briefly to the attached drawings, it being understood that the drawings described below are of course
But are only a few embodiments of the invention, which will be apparent to one of ordinary skill in the art
On the premise of creative labor, other drawings can be obtained according to the drawings.
FIG. 1 is a flowchart of a task scheduling method according to the present invention;
FIG. 2 is a flowchart of another method of a task scheduling method according to the present invention;
FIG. 3 is a flow chart of time policy resolution provided by the present invention;
FIG. 4 is a software architecture diagram of a task scheduling method according to the present invention;
FIG. 5 is a schematic diagram of a task scheduling system according to the present invention;
FIG. 6 is a schematic diagram of another architecture of a task scheduling system according to the present invention;
fig. 7 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
An embodiment of the present invention provides a task scheduling method, which may be applied to a regression testing platform, where an execution subject of the method may be a processor in a device such as a computer and a mobile terminal, and fig. 1 shows a flowchart of a method of the task scheduling method provided in the embodiment of the present invention, where the method includes:
s101: under the condition of entering a current scheduling period, acquiring a time strategy corresponding to each task to be tested;
the method provided by the embodiment of the invention relates to a plurality of scheduling periods, wherein each scheduling period adopts a fixed time step length, and when the time is polled to the current scheduling period, the time strategy corresponding to each task to be tested is obtained, and the time strategy represents the preset testing time point corresponding to each task to be tested.
S102: analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task;
in the method provided by the embodiment of the invention, each test strategy can have a more complex time format, the time strategy corresponding to each task to be tested is analyzed to obtain a specific test time point corresponding to each task to be tested, and the task to be tested which needs to be tested in the current scheduling period is determined as the target test task.
S103: and respectively scheduling each target test task for testing in the current scheduling period.
In the method provided by the embodiment of the invention, in the current scheduling period, each target test task is sequentially scheduled to be tested according to the time sequence corresponding to each target test task.
In the task scheduling method provided by the embodiment of the invention, when a new scheduling period is entered, the time strategy corresponding to each task to be tested is analyzed to determine each task to be tested which needs to be tested in the current scheduling period, each task to be tested which needs to be tested in the current scheduling period is determined as a target testing task, and then each target testing task is tested in the current scheduling period. The method and the device realize that a plurality of target test tasks can be scheduled and tested in the same scheduling period, and can be realized through the same scheduler in the specific realization process, thereby avoiding repeated writing of timer codes in the prior art and further saving codes and system resources.
In the task scheduling method provided in the embodiment of the present invention, as shown in fig. 2, on the basis of fig. 1, the method further includes step S100: and monitoring the trigger time of each scheduling period, and triggering to enter the current scheduling period when the trigger time of the current scheduling period is monitored.
In the method provided by the embodiment of the invention, a timer is arranged and used for monitoring the triggering time of each scheduling period, and in the specific implementation process, a detection step length can be set for the timer, and the next scheduling period is triggered to enter after the step length of a certain time. It is also possible to set the trigger time point of each scheduling period, for example, 6 minutes and 6 seconds at 6 pm 6 hours and 6 minutes and 6 seconds at 6 months and 10 days in 2018 to enter the first scheduling period, and 16 seconds at 6 hours to enter the second scheduling period.
The task scheduling method provided by the embodiment of the invention can be realized by depending on the task scheduler and the test platform in the specific realization process. Obviously, the invention is not limited to the Python program to realize the task scheduler, and other batch processing programs can be adopted to realize the task scheduler. The task scheduling method provided by the embodiment of the invention can realize external calling of the test platform to the task scheduler, namely the test platform is separated from the task scheduler, the task scheduler can remotely schedule the test task of the test platform through the interface function of the task scheduler, and in the case, the timer is a third-party program; the task scheduling method provided by the embodiment of the invention can also realize the internal calling of the test platform to the task scheduler, namely the test platform integrates the task scheduler, and the internal communication of the test platform and the task scheduler is realized through the interface function of the task scheduler, in this case, the timer is integrated in the test platform. Furthermore, the timer may also be integrated in the task scheduler. Therefore, the calling interface is more open, the test platform is more timely for the data issued by the task scheduler, and the management and maintenance are convenient.
In the task scheduling method provided by the embodiment of the invention, the time strategy can adopt a multi-stage time format; the time strategy is formed by combining numerical values corresponding to each level of time with different wildcards and connectors.
In the task scheduling method provided by the embodiment of the invention, when the time strategy adopts a multi-level time format, a user can set the time format of the corresponding level according to the complexity of the software system and the test capacity of each task to be tested, and for the software system with less software updating times, the time format of a month format and a week format can be adopted to test the task to be tested at regular time. For a complex software system with frequent updating times, a time format of a month format, a week format, a day format, an hour format and a minute format can be adopted to regularly test tasks to be tested. The time strategy provided by the embodiment of the invention can set the test time in a multi-stage time format according to the requirement of a user on software test, and carry out timing test on the complex task to be tested.
In the task scheduling method provided in the embodiment of the present invention, the test platform may be set as a unique entry for all scheduling data, the test platform sets the timing policy rule table, and sets a corresponding time policy for each task to be tested according to the timing policy rule table, where table 1 shows a specific example of the timing policy rule table in the embodiment of the present invention, where the time policy includes month, week, day, hour, and minute, and a five-level time format is taken as an example. For each test task, a test time specific to a minute may be set for it. The test strategy provided by the embodiment of the invention can also be accurate to a more fine time format, such as a time format of seconds, milliseconds and the like.
TABLE 1
Table 1 shows that, in the task scheduling method provided in the embodiment of the present invention, a configuration process of a time policy controlled by five-level time is adopted, and a time format of each time policy is month, week, day, hour, and minute. All precision to minute timing strategies and various combinations of strategies can be implemented in conjunction with flexible wildcards (; -, /) and connectors (;, |). Configuring timing strategies of all test plans in the test platform, and providing information of the test plans externally in an XML or JSON format. The timing strategy format is: minutes, hours, days, weeks, months.
In the task scheduling method provided in the embodiment of the present invention, in a specific implementation, the task scheduler may periodically obtain the time policy information of all the tasks to be tested according to a set step length, that is, a certain time interval.
In the task scheduling method provided in the embodiment of the present invention, analyzing the time policy corresponding to each task to be tested includes:
according to the composition format of the time strategy, sequentially determining the time point represented by each level of time format in the time strategy;
and combining the time points represented by each level of time format to determine the corresponding test execution time of each test task.
In the task scheduling method provided by the embodiment of the invention, because the time strategy adopts a multi-stage time format, when the time strategy is analyzed, the time points represented by each stage of time format can be analyzed, then the time points corresponding to each stage of analyzed time format are combined, and finally the test execution time corresponding to each test task is determined.
Taking a five-level time format as an example, when the time policy adopts the five-level time format, the method includes: month, week, day, hour, minute. When the time strategies are specifically analyzed, according to the composition format of each time strategy, the time points represented by each level of time format in the time strategies can be sequentially analyzed according to the sequence of months, weeks, days, hours and minutes.
Then, the time points characterized by each time format are combined, for example, 6 months, weeks, days, hours, and minutes are analyzed as 6 days, 6 hours and 6 minutes, and then the test is performed at 6 hours and 6 minutes of each day of the second week of 6 months.
In the task scheduling method provided in the embodiment of the present invention, determining a task to be tested, which needs to be tested in a current scheduling period, as a target test task includes:
determining a scheduling time period corresponding to the current scheduling period;
and respectively matching the test execution time corresponding to each task to be tested with the scheduling time period, and determining the task to be tested with the test execution time existing in the scheduling time period as a target test task.
In the task scheduling method provided by the embodiment of the invention, each scheduling period corresponds to a certain time range, and the task to be tested with the execution time point falling within the time range of the scheduling period is determined as the target test task.
Referring to fig. 3, a flow chart of analyzing the time policy in the task scheduling method provided in the embodiment of the present invention is shown, and taking the time policy in a five-level time format as an example, in the embodiment of the present invention, the time policy is sequentially analyzed according to a matching sequence of month, week, day, hour, and minute, so that the task to be tested is screened and filtered in the current scheduling period.
In the task scheduling method provided by the embodiment of the invention, the task scheduler timely notifies the test platform to execute the relevant test tasks after determining each target test task to be tested in the current scheduling period, and the test platform executes the test tasks in the test environment after receiving the notification.
In the task scheduling method provided by the embodiment of the invention, the task scheduler can adopt Python to realize a scheduler interface, so that remote calling and internal integration can be facilitated, the uniqueness of a data entry is ensured, and the safety management and the data maintenance are facilitated.
Referring to fig. 4, a software architecture diagram in the task scheduling method according to the embodiment of the present invention is shown, and fig. 4 is a software architecture to provide a specific example, as follows:
configuring a timing strategy for the test plan at the test platform, for example:
item 1:
timing strategy 00 x; 017*1-5*
00 denotes 0 dots per day
017 x 1-5 x means monday to friday 17 points
The project will be executed at 0 o 'clock and from Monday to Friday 17 o' clock
Item 2:
timing strategy 501/5
501/5 represents one time of execution within the first 5 minutes of 0 o' clock of each month (1 day, 6 days, 11 days … 26 days, 31 days)
And inquiring a regression test platform task interface by using a timer in the task scheduler at an interval of 1 minute to obtain JSON information:
[ { "project": item one "," schedule ": 00:, {" 1-5 "", "callback": http:// www.autotest.com/rectangle? id ═ 1 "}, {" project ": item two", "schedule": 501/5:, { "017 1-5"/, "" callback ": http:// www.autotest.com/rectangle? id ═ 2" } { ]
Resolving timing policies
When the current time is 5 pm Monday, strategies 017 x 1-5 x matching the two items
And informing the regression testing platform to execute the testing task by using a method in Callback.
In the task scheduling method provided by the embodiment of the invention, the task scheduler can realize an interface by using Python, can facilitate remote calling or internal integration, and is started in a service form, so that the code development difficulty is reduced, and the coupling degree between systems is also reduced. The timer triggers the task scheduler match check to satisfy all tasks within 1 time interval while the task scheduler triggers these tasks to perform the test. The integration scheme ensures that the data entry is unique, and is convenient for safety control and data maintenance. The function of the scheduler is pure, only the analysis and the screening of the timing task are completed, and the whole system becomes light. The scheduler can implement all precision-to-minute timing strategies and various combinations of strategies using five-level time (month, week, day, hour, minute) control and flexible wildcards (; |).
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a task scheduling system, which is used for specifically implementing the method in fig. 1, and an architecture diagram of the task scheduling system provided in the embodiment of the present invention is shown in fig. 5, and includes:
a test platform 202 and a task scheduler 201;
the task scheduler 201 is configured to obtain a time policy corresponding to each task to be tested when entering a current scheduling period; analyzing the time strategy corresponding to each task to be tested, and determining the test task needing to be tested in the current scheduling period as a target test task; and respectively scheduling each target test task to test in the test platform 202 in the current scheduling period.
In the task scheduling system provided by the embodiment of the present invention, the task scheduler 201 and the test platform 202 may be separately configured, and the task scheduler 201 may remotely schedule the test task of the test platform 202 through its own interface function.
In the task scheduling system provided in the embodiment of the present invention, the task scheduler 201 may also be integrated inside the test platform 202, and the internal communication between the test platform 202 and the task scheduler 201 may be implemented through an interface function of the task scheduler 201.
The task scheduling system provided by the embodiment of the invention analyzes the time strategy corresponding to each task to be tested when entering a new scheduling period so as to determine each task to be tested which needs to be tested in the current scheduling period, determines each task to be tested which needs to be tested in the current scheduling period as a target test task, and then tests each target test task in the current scheduling period. The method and the device realize that a plurality of target test tasks can be scheduled and tested in the same scheduling period, and can be realized through the same scheduler in the specific realization process, thereby avoiding repeated writing of timer codes in the prior art and further saving codes and system resources.
In the task scheduling system provided in the embodiment of the present invention, the task scheduler 201 may be implemented by using a Python program, and provides an external call interface, or may be implemented by using other batch processing programs.
In the task scheduling system provided in the embodiment of the present invention, the test platform 202 is configured to configure a corresponding time policy for each task to be tested.
Referring to fig. 6, which shows an architecture diagram of a task scheduling system provided by an embodiment of the present invention, in fig. 6, the task scheduler 201 includes:
the obtaining unit 203 is specifically configured to obtain a time policy corresponding to each task to be tested when the current scheduling cycle is entered;
the analyzing unit 204 may be specifically configured to analyze a time policy corresponding to each task to be tested, and determine a task to be tested that needs to be tested in a current scheduling period as a target test task;
the testing unit 205 may be specifically configured to schedule each target testing task for testing in the current scheduling period.
The task scheduling system provided by the embodiment of the present invention may further include a timer 206, and the timer 206 may be integrated in the test platform 202 or integrated in the task scheduler 201.
The timer 206 may be configured to monitor a trigger time of each scheduling period, and when the trigger time of the current scheduling period is monitored, trigger the current scheduling period to enter.
In the task scheduling system provided in the embodiment of the present invention, the timer 206 may be arranged inside the task scheduler 201, and the timer 206 is started to monitor the trigger time of each scheduling cycle by writing a corresponding start program.
In the task scheduling system provided in the embodiment of the present invention, the timer 206 may also be disposed outside the task scheduler 201, and may be disposed in the task scheduling system in the form of a third-party module. When the timer 206 is disposed outside the task scheduler 201, and when the timer 206 monitors the trigger time of the current scheduling period, an instruction signal is sent to the task scheduler 201 to prompt the task scheduler 201 to enter the next scheduling period.
In the task scheduling system provided in the embodiment of the present invention, when the task scheduler 201 is separately disposed from the test platform 202, the timer 206 may be disposed inside the task scheduler 201, or may exist in the task scheduling system in the form of a third-party module. When the task scheduler 201 is integrated in the test platform 202, the timer 206 may be disposed in the task scheduler 201 or disposed in the test platform 202.
An embodiment of the present invention further provides a storage medium, where the storage medium includes a stored instruction, where when the instruction runs, a device where the storage medium is located is controlled to execute the task scheduling method, where the method specifically includes:
under the condition of entering a current scheduling period, acquiring a time strategy corresponding to each task to be tested;
analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task;
and respectively scheduling each target test task for testing in the current scheduling period.
The method described above, optionally before performing the method, further includes:
and monitoring the trigger time of each scheduling period, and triggering to enter the current scheduling period when the trigger time of the current scheduling period is monitored.
Optionally, in the above method, the time policy adopts a multi-level time format; the time strategy is formed by combining numerical values corresponding to each level of time with different wildcards and connectors.
Optionally, in the method, analyzing the time policy corresponding to each task to be tested includes:
according to the composition format of the time strategy, sequentially determining the time point represented by each level of time format in the time strategy;
and combining the time points represented by each level of time format to determine the corresponding test execution time of each test task.
Optionally, the method for determining a task to be tested, which needs to be tested in a current scheduling period, as a target test task includes:
determining a scheduling time period corresponding to the current scheduling period;
and respectively matching the test execution time corresponding to each task to be tested with the scheduling time period, and determining the task to be tested with the test execution time existing in the scheduling time period as a target test task.
An electronic device is further provided, and its schematic structural diagram is shown in fig. 7, and specifically includes a memory 301 and one or more instructions 302, where the one or more instructions 302 are stored in the memory 301, and are configured to be executed by one or more processors 303 to execute the one or more instructions 302 for:
under the condition of entering a current scheduling period, acquiring a time strategy corresponding to each task to be tested;
analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task;
and respectively scheduling each target test task for testing in the current scheduling period.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The task scheduling method and system provided by the present invention are introduced in detail, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. A method for task scheduling, comprising:
under the condition of entering a current scheduling period, acquiring a time strategy corresponding to each task to be tested;
analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task;
and respectively scheduling each target test task for testing in the current scheduling period.
2. The method of claim 1, further comprising, prior to performing the method:
and monitoring the trigger time of each scheduling period, and triggering to enter the current scheduling period when the trigger time of the current scheduling period is monitored.
3. The method of claim 1, wherein the temporal policy is in a multi-level temporal format; the time strategy is formed by combining numerical values corresponding to each level of time with different wildcards and connectors.
4. The method of claim 3, wherein analyzing the time policy corresponding to each task to be tested comprises:
according to the composition format of the time strategy, sequentially determining the time point represented by each level of time format in the time strategy;
and combining the time points represented by each level of time format to determine the test execution time corresponding to each test task.
5. The method of claim 4, wherein determining the task to be tested in the current scheduling period as the target testing task comprises:
determining a scheduling time period corresponding to the current scheduling period;
and respectively matching the test execution time corresponding to each task to be tested with the scheduling time period, and determining the task to be tested with the test execution time existing in the scheduling time period as a target test task.
6. A task scheduling system, comprising: a test platform and a task scheduler;
the task scheduler is used for acquiring a time strategy corresponding to each task to be tested under the condition of entering a current scheduling period; analyzing the time strategy corresponding to each task to be tested, and determining the task to be tested needing to be tested in the current scheduling period as a target testing task; and respectively scheduling each target test task to test in the test platform in the current scheduling period.
7. The system of claim 6, further comprising: a timer;
the timer is used for monitoring the trigger time of each scheduling period, and when the trigger time of the current scheduling period is monitored, the current scheduling period is triggered to enter.
8. The system of claim 6, wherein the testing platform is configured to configure a corresponding time policy for each task to be tested.
9. A storage medium, comprising stored instructions, wherein when executed, the storage medium controls a device to execute the task scheduling method according to any one of claims 1 to 5.
10. An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the task scheduling method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810619940.7A CN110609784B (en) | 2018-06-15 | 2018-06-15 | Task scheduling method and system, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810619940.7A CN110609784B (en) | 2018-06-15 | 2018-06-15 | Task scheduling method and system, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110609784A true CN110609784A (en) | 2019-12-24 |
CN110609784B CN110609784B (en) | 2021-06-29 |
Family
ID=68888256
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810619940.7A Active CN110609784B (en) | 2018-06-15 | 2018-06-15 | Task scheduling method and system, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110609784B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111913858A (en) * | 2020-07-13 | 2020-11-10 | 海南车智易通信息技术有限公司 | Pressure testing system and method |
CN113391890A (en) * | 2021-04-16 | 2021-09-14 | 北京沃东天骏信息技术有限公司 | Task processing method, device and equipment and computer storage medium |
CN116302577A (en) * | 2023-05-25 | 2023-06-23 | 煤炭科学研究总院有限公司 | Algorithm unloading task executing method for multi-access edge computing system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103207807A (en) * | 2012-01-12 | 2013-07-17 | 阿里巴巴集团控股有限公司 | Task scheduling method and device |
JP2015005185A (en) * | 2013-06-21 | 2015-01-08 | ダイキン工業株式会社 | Schedule preparation system and schedule preparation program |
CN104834564A (en) * | 2015-05-20 | 2015-08-12 | 百度在线网络技术(北京)有限公司 | Task scheduling method and device |
CN107577528A (en) * | 2017-09-01 | 2018-01-12 | 长沙小卡机器人科技有限公司 | The method of multitask sequential parallel operation |
-
2018
- 2018-06-15 CN CN201810619940.7A patent/CN110609784B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103207807A (en) * | 2012-01-12 | 2013-07-17 | 阿里巴巴集团控股有限公司 | Task scheduling method and device |
JP2015005185A (en) * | 2013-06-21 | 2015-01-08 | ダイキン工業株式会社 | Schedule preparation system and schedule preparation program |
CN104834564A (en) * | 2015-05-20 | 2015-08-12 | 百度在线网络技术(北京)有限公司 | Task scheduling method and device |
CN107577528A (en) * | 2017-09-01 | 2018-01-12 | 长沙小卡机器人科技有限公司 | The method of multitask sequential parallel operation |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111913858A (en) * | 2020-07-13 | 2020-11-10 | 海南车智易通信息技术有限公司 | Pressure testing system and method |
CN113391890A (en) * | 2021-04-16 | 2021-09-14 | 北京沃东天骏信息技术有限公司 | Task processing method, device and equipment and computer storage medium |
CN116302577A (en) * | 2023-05-25 | 2023-06-23 | 煤炭科学研究总院有限公司 | Algorithm unloading task executing method for multi-access edge computing system |
CN116302577B (en) * | 2023-05-25 | 2023-08-29 | 煤炭科学研究总院有限公司 | Algorithm unloading task executing method for multi-access edge computing system |
Also Published As
Publication number | Publication date |
---|---|
CN110609784B (en) | 2021-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110609784B (en) | Task scheduling method and system, storage medium and electronic device | |
CN112214260B (en) | Method and device for loading APP (application) of terminal | |
CN102981904B (en) | A kind of method for scheduling task and system | |
CN107832230B (en) | Test method, equipment and system based on data tuning | |
CN109614391B (en) | Database diagnosis system, database diagnosis method, and non-transitory machine-readable medium | |
CN103270466A (en) | Power management via coordination and selective operation of timer-elated tasks | |
CN109117141A (en) | Simplify method, apparatus, the electronic equipment, computer readable storage medium of programming | |
CN111324426A (en) | ORACLE database task job management scheduling system and method | |
US20140280861A1 (en) | Dynamically launching inter-dependent applications based on user behavior | |
CN110110306A (en) | Method for exhibiting data, device, terminal and computer readable storage medium | |
CN109298929A (en) | Timing task carrying-out time recommended method, device, equipment and storage medium | |
CN110968371A (en) | Method and system for configuring workflow in data warehouse | |
US9626640B2 (en) | Closed loop performance management for service delivery systems | |
CN113157569B (en) | Automated testing method, apparatus, computer device and storage medium | |
CN116431311A (en) | Task scheduling method and related system | |
CN117312092A (en) | Multi-core MCU monitoring method and device, vehicle and readable storage medium | |
CN110764911A (en) | Resource scheduling method, device and control system based on order | |
EP3407191A1 (en) | Managing job schedules | |
CN103092693B (en) | A kind of method for scheduling task for computer and system | |
CN110990137B (en) | Application program function module scheduling method, scheduling information processing method and device | |
CN113056756B (en) | Sleep recognition method and device, storage medium and electronic equipment | |
CN112183982A (en) | Workflow creating method and device, computer equipment and storage medium | |
CN112561326A (en) | Task execution method and device, storage medium and electronic device | |
CN111582834A (en) | Schedule generation method and device, computer equipment and readable storage medium | |
CN116501477B (en) | Automatic data processing method, device and equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |