CN115879713A - Task execution method, device, equipment, medium and product - Google Patents

Task execution method, device, equipment, medium and product Download PDF

Info

Publication number
CN115879713A
CN115879713A CN202211549301.0A CN202211549301A CN115879713A CN 115879713 A CN115879713 A CN 115879713A CN 202211549301 A CN202211549301 A CN 202211549301A CN 115879713 A CN115879713 A CN 115879713A
Authority
CN
China
Prior art keywords
task
target
state
target task
executed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211549301.0A
Other languages
Chinese (zh)
Inventor
黄澄海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211549301.0A priority Critical patent/CN115879713A/en
Publication of CN115879713A publication Critical patent/CN115879713A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application discloses a task execution method, device, equipment, medium and product. The method comprises the following steps: under the condition that the task scheduling is recovered from the abnormal state to the normal state, acquiring a target task table; executing the target task according to the target task parameter under the condition that the target task state is an unexecuted state; determining whether the target executed times are less than the target maximum executed times under the condition that the target state is an execution failure state; and executing the target task according to the target task parameter under the condition that the target executed times are less than the target maximum executed times. Therefore, after the task scheduling is recovered from the abnormal state to the normal state, tasks which are not executed and failed to be executed can be automatically found, the tasks are executed based on the pre-stored task parameters, manual operation is not needed, labor cost is reduced, and the error probability is reduced.

Description

Task execution method, device, equipment, medium and product
Technical Field
The present application relates to the field of task processing technologies, and in particular, to a method, an apparatus, a device, a medium, and a product for executing a task.
Background
Generally, a certain task needs to be executed by a specific task scheduling service, once the task scheduling service is abnormal, the task which should be executed cannot be executed within the time of processing the abnormality, and after the task scheduling service returns to normal, the tasks are turned over and cannot be automatically executed again, but some important tasks are indispensable to be executed.
In the related art, the operation and maintenance personnel are usually required to manually perform the specified task, and even the developer is required to reconfigure the task parameters to perform the missed task. However, the number of tasks is usually huge, so that a large amount of manual operation is required, and not only is the labor cost high, but also the manual operation is prone to errors.
Disclosure of Invention
The embodiment of the application provides a task execution method, a device, equipment, a medium and a product, which can automatically find tasks which are not executed and are failed to be executed after task scheduling is recovered from an abnormal state to a normal state, execute the tasks based on pre-stored task parameters, do not need manual operation, reduce labor cost and reduce error probability.
In a first aspect, an embodiment of the present application provides a task execution method, where the method includes:
under the condition that the task scheduling is recovered from the abnormal state to the normal state, a target task table is obtained, wherein the target task table comprises target task parameters, a target task state, target executed times and target maximum executed times corresponding to a target task;
executing the target task according to the target task parameter under the condition that the target task state is an unexecuted state;
determining whether the target executed times are less than the target maximum executed times under the condition that the target state is an execution failure state;
and executing the target task according to the target task parameter under the condition that the target executed times are less than the target maximum executed times.
In a second aspect, an embodiment of the present application provides a task execution device, including:
the acquisition module is used for acquiring a target task table under the condition that the task scheduling is recovered from the abnormal state to the normal state, wherein the target task table comprises a target task parameter, a target task state, a target executed frequency and a target maximum executed frequency which correspond to a target task;
the first execution module is used for executing the target task according to the target task parameter under the condition that the target task state is the unexecuted state;
the determining module is used for determining whether the target executed times are smaller than the target maximum executed times under the condition that the target state is an execution failure state;
and the second execution module is used for executing the target task according to the target task parameter under the condition that the target executed times are smaller than the target maximum executed times.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a task execution method as shown in any of the embodiments of the first aspect.
In a fourth aspect, the present application provides a computer storage medium, on which computer program instructions are stored, and when executed by a processor, the computer program instructions implement the task execution method shown in any one of the embodiments of the first aspect.
In a fifth aspect, the present application provides a computer program product, and when executed by a processor of an electronic device, the instructions of the computer program product cause the electronic device to perform the task execution method shown in any one of the embodiments of the first aspect.
According to the task execution method, the task execution device, the task execution equipment, the task execution medium and the task execution product, under the condition that task scheduling is recovered to a normal state from an abnormal state, a target task table can be obtained, the target task table comprises target task parameters and target task states corresponding to target tasks, then the target tasks can be executed according to the target task parameters under the condition that the target task states are not executed, and under the condition that the target states are execution failure states and the target executed times are smaller than the target maximum execution times, the target tasks are executed according to the target task parameters. That is to say, according to the task execution method, device, apparatus, medium, and product provided by the embodiments of the present application, the task parameters are stored in the target task table in advance, and after the task scheduling is returned from the abnormal state to the normal state, the task that is not executed and fails to be executed can be automatically found, and the task is executed based on the task parameters stored in advance, so that manual operation is not required, and not only is the labor cost reduced, but also the probability of error is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings may be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a task execution method provided by an embodiment of the present application;
FIG. 2 is a flow diagram of another task execution method provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a task execution device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative only and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is 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 … …" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
In addition, it should be noted that, in the technical solution of the present application, the acquisition, storage, use, processing, etc. of data all comply with relevant regulations of national laws and regulations.
For example, in a daily business scene, a task needs to be batched, a specific scheduling service needs to be relied on, once the scheduling service is hung, a specified task needs to be executed but not executed within a fault handling time, after the scheduling service is recovered, the task is turned over, the task cannot be batched and turned over automatically, for an indispensable task, an operation and maintenance person needs to manually execute the specified task, even a developer needs to reconfigure task parameters, and the operation and maintenance is very inconvenient in an emergency at night.
In the related art, configuration files are generally modified through a scheduling center, compiling and packaging are performed, an executor is integrated and deployed in an existing service project, the project configuration files configure the address of a management platform of the scheduling center, a scheduling service compiles a task to be executed, a task interface is called, a batch running task is newly built on the management platform interface, and retry times are set.
However, the retry mechanism in the related art only performs rerun for a failed batch running task, but cannot automatically retry for a turned-over task, and when the retry is performed manually, a batch running parameter with an accurate task needs to be input, for example, a batch running task should be performed at 1 month, 2 days and 00 hours, and the number of active users per day (1 month, 1 day) is counted, but since the server is down for 1 month, 2 days and a whole day until 1 month, 3 days are recovered, at this time, an operation and maintenance worker needs to manually fill 1 month, 1 day as a task parameter to perform the counting of the number of active users per month, and if the number of tasks is hundreds of thousands, a large amount of manpower needs to be thrown, and the process is prone to errors.
The embodiment of the application provides a task execution method, which can acquire a target task table under the condition that task scheduling is recovered to a normal state from an abnormal state, wherein the target task table comprises a target task parameter and a target task state corresponding to a target task, then can execute the target task according to the target task parameter under the condition that the target task state is an unexecuted state, and execute the target task according to the target task parameter under the condition that the target state is an execution failure state and the target executed times are less than the target maximum execution times. That is to say, according to the task execution method, device, apparatus, medium, and product provided by the embodiments of the present application, the task parameters are stored in the target task table in advance, and after the task scheduling is returned from the abnormal state to the normal state, the task that is not executed and fails to be executed can be automatically found, and the task is executed based on the task parameters stored in advance, so that manual operation is not required, and not only is the labor cost reduced, but also the probability of error is reduced.
Fig. 1 shows a flowchart of a task execution method provided in an embodiment of the present application, and it should be noted that the task execution method may be applied to a task execution device, as shown in fig. 1, the task execution method may include the following steps:
s110, under the condition that the task scheduling is recovered from the abnormal state to the normal state, acquiring a target task table;
s120, executing the target task according to the target task parameter under the condition that the target task is in an unexecuted state;
s130, under the condition that the target state is the execution failure state, determining whether the target executed times are less than the target maximum executed times;
and S140, executing the target task according to the target task parameter under the condition that the target executed times are less than the target maximum executed times.
Therefore, when the task scheduling is recovered from the abnormal state to the normal state, a target task table can be obtained, the target task table comprises a target task parameter and a target task state corresponding to the target task, then the target task can be executed according to the target task parameter when the target task state is the non-execution state, and the target task can be executed according to the target task parameter when the target state is the execution failure state and the target executed times are less than the target maximum execution times. That is to say, according to the task execution method, the task execution device, the task execution apparatus, the task execution medium, and the task execution product provided in the embodiments of the present application, the task parameters are stored in the target task table in advance, and after the task scheduling is returned from the abnormal state to the normal state, the task that is not executed and failed to be executed can be automatically found, and the task is executed based on the task parameters stored in advance, so that manual operation is not required, and not only is the labor cost reduced, but also the error probability is reduced.
Referring to S110, the restoration of the task scheduling from the abnormal state to the normal state may mean that a module responsible for the task scheduling service is failed and then repaired. The target task table may be a database table. The target task table may include target task parameters, target task states, target executed times, and target maximum executed times corresponding to the target tasks.
The target task parameter may be a parameter required for executing the target task. The target task state may be an unexecuted state, an execution failed state, or an execution successful state. The target number of executed times may be the number of times the target task has been executed. The target maximum number of executions may be the maximum number of times the target task can be executed.
In some embodiments, as shown in fig. 2, in order to facilitate automatic execution of the missed task after the task schedule is returned from the abnormal state to the normal state, before S110, the method may further include the following steps:
s150, receiving a first input of a user to a preset task table;
and S160, responding to the first input, configuring task data corresponding to the plurality of tasks in a preset task table, and obtaining a target task table.
Here, the preset task table may include fields such as a task name, a task type, a task parameter, a task state, the number of executed times, the maximum number of executed times, a scheduled start time, a priority, an actual execution start time, an actual execution end time, and a failure reason.
The first input may be an input to enter task data under a plurality of fields in a preset task table.
The target task table may include task data corresponding to a plurality of tasks, and the task data may include task parameters, task states, executed times, maximum executed times, scheduled start time, and priorities, and may further include data such as task names, task types, actual execution start time, actual execution end time, and failure reasons.
Data such as the actual execution starting time, the actual execution ending time, and the failure reason may be generated according to the actual execution of the task.
The initial value of the task state may be an unexecuted state, and may be updated according to the actual execution condition of the task.
The initial value of the executed times may be 0, and may be updated according to the actual execution condition of the task.
The task names of different tasks may be different. Task types may facilitate viewing and statistics management.
The scheduled start time may be a preset time at which execution of the task is started.
The task state is an unexecuted state, an execution success state or an execution failure state, and illustratively, the unexecuted state may be represented by 0, the execution success state may be represented by 1, and the execution failure state may be represented by 2.
The task parameter may be a parameter required to perform a task, and when the number of task parameters is plural, the plural task parameters may be separated by commas. For example, a certain task is that the number of active users on day of the previous day is counted at time 01.
Some tasks may fail to be executed for a long time due to special reasons, in order to avoid resource waste caused by executing the tasks again all the time, the maximum execution times may be set, and when the execution times of the tasks reach the maximum execution times, the tasks may not be executed any more, so that resource waste is avoided.
In this way, by configuring the target task table, the task data corresponding to each of the plurality of tasks can be stored in the target task table in advance, so that after the task scheduling is returned from the abnormal state to the normal state, the missed task can be automatically executed, and the task scheduling does not need to be manually input when the task scheduling is abnormal and returns to the normal state.
Referring to S120, a task may be performed using a task orchestration (scheduling) technique. If the target task state is the non-execution state, it may indicate that the target task is a task that is missed due to the task scheduling exception, and therefore the target task may be executed according to the target task parameter.
Referring to S130, a task may be performed using a task orchestration (scheduling) technique. If the target task state is the execution failure state, it may indicate that the target task is a task that has failed to be executed due to the task scheduling exception or that cannot be re-executed due to the task scheduling exception. However, in order to avoid wasting resources by always re-executing the task, it is necessary to determine whether the number of times the target task has been executed is less than the target maximum number of times.
Referring to S140, if the number of executed target times is less than the maximum number of executed target times, the target task may be executed according to the target task parameter; and if the target executed times are not less than the target maximum executed times, the target task is not executed.
In addition, if the target task state is the execution success state, the target task is indicated to be executed successfully before the task scheduling is abnormal, and therefore the target task does not need to be executed again.
In some embodiments, in order to perform the task more smoothly, the performing the target task according to the target task parameter may include:
and under the condition that the target task table comprises at least one first task, executing the at least one first task and the target task according to the sequence from high to low of the priority level corresponding to the at least one first task and the target task respectively.
The first task may be a task satisfying a preset condition.
The preset conditions may be:
the first task and the target task have the same scheduled starting time and the task state corresponding to the first task is an unexecuted state,
or the first task and the target task have the same scheduled starting time, the task state corresponding to the first task is an execution failure state, and the executed times corresponding to the first task are smaller than the maximum executed times.
Here, if there is at least one other task that needs to be executed when the task scheduling is returned from the abnormal state to the normal state, the tasks may be executed according to the sequence of the scheduled start times corresponding to the at least one task and the target task, respectively. However, if there is a first task that is the same as the scheduled start time of the target task, the first task and the target task need to be executed in order of priority corresponding to each task.
The first task may be a task that needs to be executed in a case where the task schedule is returned from the abnormal state to the normal state, and is the same as the scheduled start time of the target task.
Exemplarily, in the case where the task scheduling is restored from the abnormal state to the normal state, there are 3 tasks that need to be executed: A. b and C. Wherein the schedule starting time of task a is 01 00 and the priority is 1, the schedule starting time of task B is 01 and the priority is 1, the schedule starting time of task C is 01. The execution order may be: task C, task A, and task B.
In this way, tasks which originally need to be executed at the same time can be executed according to the priority order, and therefore the tasks are executed more smoothly.
In some embodiments, to facilitate determining the number of times the task has been executed, after executing the target task according to the target task parameter, the method may further include:
and adding 1 to the target executed times corresponding to the target task.
Here, if the target task state is the non-execution state, the target number of times of execution corresponding to the target task is 0 before the target task is executed according to the target task parameter, and the target number of times of execution corresponding to the target task is updated to 1 after the target task is executed according to the target task parameter.
If the target task state is the execution failure state, before the target task is executed according to the target task parameter, the target executed frequency corresponding to the target task is n (n is a positive integer), and after the target task is executed according to the target task parameter, the target executed frequency corresponding to the target task is updated to n +1.
Therefore, the executed times corresponding to the tasks can be automatically updated according to the execution condition of the tasks, so that whether the tasks exceed the maximum execution times or not can be determined, the execution of the tasks is stopped when the executed times corresponding to the tasks exceed the maximum execution times, and the waste of resources is avoided.
In some embodiments, in order to perform the task more accurately, after the target task is performed according to the target task parameter, the method may further include:
under the condition that the target task is successfully executed, updating the target task state into a successful execution state;
and updating the target task state to be the execution failure state when the target task fails to execute.
Here, whether after S120 or after S140, if the target task is successfully executed, the target task state corresponding to the target task may be updated to the execution success state; if the target task fails to be executed, the target task state corresponding to the target task may be updated to the execution failure state.
Therefore, the task state corresponding to the task can be automatically updated according to the execution condition of the task, so that whether the task needs to be executed again in the follow-up process or not can be determined according to the task state.
In some embodiments, to facilitate determining a reason for a task execution failure, the method may further comprise:
and when the target task fails to execute, saving the failure reason of the target task into the target task table.
Here, if the target task fails to execute, the failure reason of the target task may be saved under the failure reason field of the target task table, so as to prompt the user of the reason for the failure of the target task.
In this way, by automatically saving the failure reason of the target task, the reason of the task execution failure can be conveniently determined, so that the user can conveniently take corresponding measures.
Based on the same inventive concept, the embodiment of the application also provides a task execution device. The task execution device provided in the embodiment of the present application is described in detail below with reference to fig. 3.
Fig. 3 is a schematic structural diagram illustrating a task execution device according to an embodiment of the present application.
As shown in fig. 3, the task performing device may include:
an obtaining module 301, configured to obtain a target task table when task scheduling returns from an abnormal state to a normal state, where the target task table includes a target task parameter, a target task state, a target executed number, and a target maximum executed number corresponding to a target task;
a first executing module 302, configured to execute the target task according to the target task parameter when the target task state is an unexecuted state;
a determining module 303, configured to determine whether the target executed number is smaller than the target maximum executed number when the target state is an execution failure state;
and a second executing module 304, configured to execute the target task according to the target task parameter when the target executed number is smaller than the target maximum executed number.
Therefore, when the task scheduling is recovered from the abnormal state to the normal state, a target task table can be obtained, the target task table comprises a target task parameter and a target task state corresponding to the target task, then the target task can be executed according to the target task parameter when the target task state is the non-execution state, and the target task can be executed according to the target task parameter when the target state is the execution failure state and the target executed times are less than the target maximum execution times. That is to say, according to the task execution method, device, apparatus, medium, and product provided by the embodiments of the present application, the task parameters are stored in the target task table in advance, and after the task scheduling is returned from the abnormal state to the normal state, the task that is not executed and fails to be executed can be automatically found, and the task is executed based on the task parameters stored in advance, so that manual operation is not required, and not only is the labor cost reduced, but also the probability of error is reduced.
In some embodiments, in order to facilitate automatic execution of a missed task after the task schedule is restored from the abnormal state to the normal state, the task performing apparatus may further include:
the receiving module is used for receiving first input of a user to a preset task table before a target task table is acquired under the condition that task scheduling is recovered from an abnormal state to a normal state;
and the configuration module is used for responding to the first input, configuring task data corresponding to the plurality of tasks in a preset task table to obtain a target task table, wherein the task data comprises task parameters, task states, executed times, maximum executed times, plan starting time and priorities.
In some embodiments, in order to perform the task more smoothly, the first execution module 302 and the second execution module 304 may each include:
the execution submodule is used for executing at least one first task and the target task according to the sequence from high to low of the priority corresponding to the at least one first task and the target task respectively under the condition that the target task list comprises the at least one first task, the first task is a task meeting a preset condition,
the preset conditions are as follows:
the first task and the target task have the same scheduled starting time and the task state corresponding to the first task is an unexecuted state,
or the first task and the target task have the same scheduled starting time, the task state corresponding to the first task is an execution failure state, and the executed times corresponding to the first task are smaller than the maximum executed times.
In some embodiments, to facilitate determining the number of times the task has been performed, the task performing device may further include:
and the counting module is used for adding 1 to the target executed times corresponding to the target task after the target task is executed according to the target task parameters.
In some embodiments, in order to perform the task more precisely, the task performing device may further include:
the first updating module is used for updating the target task state to an execution success state under the condition that the target task is successfully executed after the target task is executed according to the target task parameters;
and the second updating module is used for updating the target task state to the execution failure state under the condition that the target task fails to execute.
In some embodiments, to facilitate determining a reason for a task execution failure, the task execution device may further include:
and the storage module is used for storing the failure reason of the target task into the target task table under the condition that the target task fails to execute.
Fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
As shown in fig. 4, the electronic device 4 is capable of implementing a structure diagram of an exemplary hardware architecture of an electronic device according to the task execution method and the task execution apparatus in the embodiment of the present application. The electronic device may refer to an electronic device in the embodiments of the present application.
The electronic device 4 may comprise a processor 401 and a memory 402 in which computer program instructions are stored.
In particular, the processor 401 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 402 may include mass storage for data or instructions. By way of example, and not limitation, memory 402 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 402 may include removable or non-removable (or fixed) media, where appropriate. The memory 402 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 402 is a non-volatile solid-state memory. In particular embodiments, memory 402 may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory 402 comprises one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform operations described with reference to a method according to an aspect of the present application.
The processor 401 reads and executes the computer program instructions stored in the memory 402 to implement any one of the task execution methods in the above embodiments.
In one example, the electronic device can also include a communication interface 403 and a bus 404. As shown in fig. 4, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 404 to complete communication therebetween.
The communication interface 403 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present application.
Bus 404 comprises hardware, software, or both coupling the components of the electronic device to one another. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 404 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The electronic device may execute the task execution method in the embodiment of the present application, so as to implement the task execution method and apparatus described in conjunction with fig. 1 to 3.
In addition, in combination with the task execution method in the foregoing embodiment, the embodiment of the present application may provide a computer storage medium to implement. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the task execution methods in the above embodiments.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (10)

1. A method of task execution, comprising:
under the condition that task scheduling is recovered from an abnormal state to a normal state, a target task table is obtained, wherein the target task table comprises target task parameters, a target task state, target executed times and target maximum executed times corresponding to a target task;
under the condition that the target task state is an unexecuted state, executing the target task according to the target task parameter;
determining whether the target executed times are less than the target maximum executed times under the condition that the target state is an execution failure state;
and under the condition that the target executed times are smaller than the target maximum executed times, executing the target task according to the target task parameters.
2. The method according to claim 1, wherein in case that the task scheduling is returned from the abnormal state to the normal state, before acquiring the target task table, the method further comprises:
receiving a first input of a user to a preset task table;
and responding to the first input, configuring task data corresponding to a plurality of tasks in the preset task table to obtain the target task table, wherein the task data comprises task parameters, task states, executed times, maximum executed times, plan starting time and priorities.
3. The method of claim 1, wherein the executing the target task according to the target task parameters comprises:
under the condition that the target task table comprises at least one first task, executing the at least one first task and the target task according to the sequence from high to low of the priority corresponding to the at least one first task and the target task respectively, wherein the first task is a task meeting a preset condition,
the preset conditions are as follows:
the first task and the target task have the same scheduled starting time and the task state corresponding to the first task is an unexecuted state,
or the first task and the target task have the same scheduled starting time, the task state corresponding to the first task is an execution failure state, and the executed times corresponding to the first task are less than the maximum executed times.
4. The method of claim 1, wherein after the performing the target task according to the target task parameters, the method further comprises:
and adding 1 to the target executed times corresponding to the target task.
5. The method of claim 1, wherein after the performing the target task according to the target task parameters, the method further comprises:
under the condition that the target task is successfully executed, updating the target task state into a successful execution state;
and under the condition that the target task fails to execute, updating the target task state into a failed execution state.
6. The method of claim 5, further comprising:
and under the condition that the target task fails to execute, saving a failure reason of the target task into the target task table.
7. A task execution apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a target task table under the condition that task scheduling is recovered from an abnormal state to a normal state, and the target task table comprises target task parameters, a target task state, target executed times and target maximum executed times corresponding to a target task;
the first execution module is used for executing the target task according to the target task parameter under the condition that the target task state is an unexecuted state;
a determining module, configured to determine whether the target executed number is smaller than the target maximum executed number when the target state is an execution failure state;
and the second execution module is used for executing the target task according to the target task parameter under the condition that the target executed times are smaller than the target maximum executed times.
8. An electronic device, characterized in that the device comprises: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a method of task execution as recited in any of claims 1-6.
9. A computer storage medium having computer program instructions stored thereon which, when executed by a processor, implement a method of task execution according to any one of claims 1 to 6.
10. A computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform a task execution method according to any one of claims 1-6.
CN202211549301.0A 2022-12-05 2022-12-05 Task execution method, device, equipment, medium and product Pending CN115879713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211549301.0A CN115879713A (en) 2022-12-05 2022-12-05 Task execution method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211549301.0A CN115879713A (en) 2022-12-05 2022-12-05 Task execution method, device, equipment, medium and product

Publications (1)

Publication Number Publication Date
CN115879713A true CN115879713A (en) 2023-03-31

Family

ID=85765914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211549301.0A Pending CN115879713A (en) 2022-12-05 2022-12-05 Task execution method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN115879713A (en)

Similar Documents

Publication Publication Date Title
CN110225078B (en) Application service updating method, system and terminal equipment
CN110275992B (en) Emergency processing method, device, server and computer readable storage medium
CN112200505B (en) Cross-business system process monitoring device and method, corresponding equipment and storage medium
CN110633977A (en) Payment exception processing method and device and terminal equipment
CN109725906A (en) A kind of code compiling method and corresponding continuous integration system
CN107992420B (en) Management method and system for test item
CN115879713A (en) Task execution method, device, equipment, medium and product
CN112817883A (en) Method, device and system for adapting interface platform and computer readable storage medium
CN111522680A (en) Method, device and equipment for automatically repairing abnormal task node
CN111181777A (en) Service degradation method, device, computer equipment and storage medium
CN116069751A (en) Information processing method, apparatus, device and computer readable storage medium
CN116028243A (en) Message processing method and device
CN115525568A (en) Code coverage rate inspection method and device, computer equipment and storage medium
CN111488236B (en) Order exception processing method, server, storage medium and processing device
CN115113871A (en) Front-end code version information checking method, device and equipment based on data middlebox
CN112651514A (en) Operation and maintenance task execution method and device, operation and maintenance server and computer storage medium
CN113297149A (en) Method and device for monitoring data processing request
CN112487004A (en) Method, device, medium and system for automatically controlling task based on data blood margin
CN111258728A (en) Task execution method and device, storage medium and electronic device
CN113886379A (en) Data processing method, device, equipment and storage medium
CN115545677B (en) Online process specification detection method and system based on automatic case execution condition
CN115907412A (en) Data line defect solving method, device, equipment, medium and product
CN116700775A (en) Software version packaging method, device, equipment, medium and product
CN114675939A (en) Configuration file checking method and device
CN114691332A (en) Data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination