Task execution method, timing operation and maintenance method and task execution system

By interrupting and updating timed tasks with new versions based on server-provided information, the method addresses flexibility and scalability issues in timed task execution, enhancing usability and expandability.

CN120315818APending Publication Date: 2025-07-15HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410057586.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-15
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In the prior art, the execution flexibility and availability of timing tasks are insufficient, especially when modification of timing tasks is required, it is easy to cause execution chaos, resulting in insufficient availability and scalability of task execution.

Method used

By introducing a task version mechanism for timing tasks, when the target timing tasks need to be executed, the modified target task version and execution information is found, and the current task version is interrupted when the target task version is different from the current task version, and the target task version is re-execute to realize the modification of the timing task during the execution process.

Benefits of technology

Improves the flexibility of timing tasks and the availability and scalability of task execution, ensuring the stability and flexibility of task execution process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120315818A_ABST
    Figure CN120315818A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task execution method, a timed operation and maintenance method and a task execution system. The task execution method comprises the steps of obtaining a task execution request; according to the target task identifier, a target task version and target execution information of the target timed task are searched from response information sent by the server side, the response information is obtained by modifying the modified timed task by the server side, and the response information comprises a task version and execution information obtained after modifying the modified timed task; and when the target task version is different from the current task version of the target timed task, interrupting execution of the target timed task of the current task version, and executing the target timed task of the target task version based on the target execution information. Through iteration of different versions of the timed task, under the action of an interrupt mechanism, modification of the timed task in the execution process is achieved, the flexibility of the timed task is improved, and the availability and expandability of task execution are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and particularly to a task execution method, a timing operation and maintenance method, and a task execution system. Background Art

[0002] With the development of computer technology, efficient management of computer systems has been achieved by setting up script tasks that run automatically.

[0003] Currently, compared with script tasks that are executed immediately, script tasks that are executed at a scheduled time can be executed more accurately and stably in task scenarios with high requirements for time accuracy, and have high flexibility and high availability, improving the efficiency and stability of task execution.

[0004] However, if a scheduled task that is currently being executed needs to be modified, it will cause chaos in the execution of the scheduled task, which to a certain extent limits the flexibility of the scheduled task and results in insufficient availability and scalability of task execution. Therefore, there is an urgent need for a task execution method with high availability and high scalability. Summary of the Invention

[0005] In view of this, the embodiments of this specification provide a task execution method. One or more embodiments of this specification also relate to another task execution method, a timing operation and maintenance method, a task execution system, a task execution device, another task execution device, a timing operation and maintenance task execution device, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects existing in the prior art.

[0006] The embodiments of this specification provide a task execution method, which is applied to a client and includes:

[0007] Obtain a task execution request, where the task execution request carries a target task identifier of a target scheduled task;

[0008] According to the target task identifier, find the target task version and target execution information of the target scheduled task from the response information sent by the server, where the response information is obtained by the server modifying a scheduled task, and the response information includes the task version and execution information obtained after modifying the scheduled task;

[0009] In the case where the target task version is different from the current task version of the target scheduled task, interrupt the execution of the target scheduled task of the current task version, and execute the target scheduled task of the target task version based on the target execution information.

[0010] In one embodiment of this specification, the task version of the timed task is introduced. When it is necessary to execute the target timed task, only the modified target task version and target execution information need to be found in the response message. When the target task version is different from the current task version, the execution of the target timed task of the current task version can be interrupted, and based on the modified target execution information, the target timed task of the target task version can be re-executed. Through the iteration of different versions of the timed task, under the action of the interruption mechanism, the modification of the timed task during the execution process is realized, the flexibility of the timed task is improved, and the usability and scalability of the task execution are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a flowchart of a task execution method provided by an embodiment of this specification;

[0012] Figure 2 is a flowchart of another task execution method provided by an embodiment of this specification;

[0013] Figure 3 is a schematic flowchart of a task execution method provided by an embodiment of this specification;

[0014] Figure 4 is a schematic flowchart of the interaction between the client and the server of a task execution method provided by an embodiment of this specification;

[0015] Figure 5 is a front-end schematic diagram of task modification of a task execution method provided by an embodiment of this specification;

[0016] Figure 6 is a flowchart of a timed operation and maintenance method provided by an embodiment of this specification;

[0017] Figure 7 is a processing process flowchart of a task execution method applied to the operation and maintenance of a network cloud server provided by an embodiment of this specification;

[0018] Figure 8 is a schematic structural diagram of a task execution system provided by an embodiment of this specification;

[0019] Figure 9 is a schematic structural diagram of a task execution device provided by an embodiment of this specification;

[0020] Figure 10 is a schematic structural diagram of another task execution device provided by an embodiment of this specification;

[0021] Figure 11 is a schematic structural diagram of a timed operation and maintenance task execution device provided by an embodiment of this specification;

[0022] Figure 12 It is a structural block diagram of a computing device provided by an embodiment of this specification. Detailed implementation manners

[0023] In the following description, many specific details are set forth in order to provide a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of this specification. Therefore, this specification is not limited by the specific implementations disclosed below.

[0024] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0025] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0026] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for the user to choose to authorize or refuse.

[0027] First, the noun terms involved in one or more embodiments of this specification are explained.

[0028] Infrastructure as a Service (IaaS): A cloud computing service model. In this service model, cloud service providers provide users with access to and use of computing infrastructure resources via the Internet. Users can rent and configure these resources as needed without having to purchase and maintain hardware devices themselves. IaaS typically includes cloud computing resources such as servers, storage space, network devices, and data center facilities, and allows users to be billed according to actual usage or occupancy.

[0029] Elastic Compute Service (ECS): A cloud computing service, which is an infrastructure service model that allows users to create and manage virtual server instances in the cloud. These virtual servers can meet various different computing needs and can flexibly allocate elastic cloud computing resources according to project requirements, including scaling up or down. It is applicable to a variety of scenarios, including website hosting, application deployment, big data processing, and game development, etc.

[0030] Scheduled task: A task that is executed at a specified time point or time interval designated by the user. Compared with tasks executed immediately, scheduled tasks are more flexible and have stronger usability. Especially in some scenarios with high requirements for time accuracy, they can accurately trigger operation and maintenance tasks at a scheduled time, greatly improving operation and maintenance efficiency and stability; scheduled tasks can efficiently support different operation and maintenance scenarios, greatly simplifying the difficulty and complexity of operation and maintenance, and playing an increasingly important role in actual production.

[0031] Operation and maintenance tools: Perform operations such as batch operation and maintenance, executing commands, and sending files on cloud computing services. Typical usage scenarios include: installing and uninstalling software, starting or stopping tasks, distributing configuration files, and executing general commands (or scripts), etc.

[0032] Script task: An automated operation task that executes specific tasks through programming scripts and can achieve certain specific functions.

[0033] Resource instance: Refers to a specific object or variable used to represent and access external resources (such as files, database connections, network sockets, etc.) in computer programming. These resources may exist in the operating system or other software components, and are created, managed, and used by applications by calling specific Application Programming Interface (API) functions or methods.

[0034] Base64 encoding: A common data encoding method used to convert binary data into a printable ASCII character set representation. This character set contains 64 characters: lowercase letters a - z, uppercase letters A - Z, digits 0 - 9, and two symbols + and / .

[0035] In this specification, a task execution method is provided. This specification also relates to another task execution method, a timing operation and maintenance method, a task execution system, a task execution device, another task execution device, a timing operation and maintenance task execution device, a computing device, a computer - readable storage medium, and a computer program, which will be described in detail one by one in the following embodiments.

[0036] See Figure 1 , Figure 1 shows a flowchart of a task execution method provided by an embodiment of this specification, which is applied to a client and includes the following specific steps:

[0037] Step 102: Obtain a task execution request, where the task execution request carries a target task identifier of a target timing task.

[0038] The client is a client of an application, website, or applet that executes timing tasks. For example, it is a client of an operation and maintenance tool for a network cloud server, or a client of a database management platform, or a client of a project management platform. Users can modify and execute ongoing timing tasks through specific application programming interfaces on the client, such as OpenAPI.

[0039] The timing task is a script task that executes at a specific time point or according to a specific frequency. Taking the client of a network cloud server as an example, for example, the timing task is a server's scheduled deployment task, or a system's scheduled monitoring task, or a continuous integration task (abbreviated as CI) for continuously building software and completing initial tests, a continuous delivery task for continuously delivering software products, and a continuous deployment task (abbreviated as CD) for continuously deploying to the environment. The timing task has a corresponding timing type, including but not limited to: periodic type and start - trigger type. Among them, the periodic type includes execution at a fixed time interval, execution at a specified time, and clock - based timing execution. The periodic type is a type that executes at a specific time point or according to a specific frequency, and the start - trigger type is a type that executes at the time point when the client starts.

[0040] The task identifier of a scheduled task is an identifier for uniquely identifying and managing the scheduled task. This identifier may have different representations in different programming languages, frameworks, and systems. The task identifier differentiates different scheduled tasks and enables the management and tracking of the target scheduled task. The task identifier includes, but is not limited to: task name, task label, and task ID. It should be noted that the task identifier of a scheduled task generally does not change, but the task version and execution information of the scheduled task will change.

[0041] The task version of a scheduled task is a unique version identifier assigned after modifying the scheduled task. The task version differentiates different execution contents of the same scheduled task (scheduled tasks with the same task identifier). The format of the task version includes, but is not limited to: the timestamp of modifying the scheduled task and the update of the task version after each modification (for example, automatically incremented by 1). For example, if the timestamp of the modification is "2023-01-01", "2023.01.01" is determined as the task version. Another example is that after modifying the scheduled task 3 times, the task version is "Ver.3". The execution information is the information of the execution content of the scheduled task, including, but not limited to: frequency parameter, command information, and resource instance information. Once the execution information of the scheduled task is modified, it is considered that a version iteration update of the scheduled task has occurred, and the task version needs to be updated accordingly.

[0042] The target scheduled task is the scheduled task that needs to be executed. The target task identifier of the target scheduled task is an identifier for uniquely identifying and managing the target scheduled task.

[0043] The task execution request is an instruction request for executing the scheduled task of the target task version.

[0044] Obtaining the task execution request can be sent from the terminal to the client or generated in response to a preset trigger condition. The preset trigger condition includes, but is not limited to: periodic trigger condition or start trigger condition. The periodic trigger condition is triggered according to the execution frequency, and the start trigger condition is triggered by the client.

[0045] Before step 102, the following specific steps are also included: sending a task creation request to the server to instruct the server to create a scheduled task, and receiving the response information sent by the server. Sending the task creation request can be specifically implemented through an application programming interface. The response information in this step includes the initial task version and execution information.

[0046] Exemplarily, on the client side of the operation and maintenance tool of the network cloud server, a scheduled task Task_i is created through the API—RunCommand interface. The scheduled task includes 1 resource instance, the resource instance information is "Instance_ID_1", the command information is "CommandContent_1", and the frequency parameter is "00 / 10***?(executed once every 10 minutes)". The server creates the scheduled task and returns response information through the API—RunCommand interface: the command information "CommandContent_1", the task identifier "Task_ID_i", and the task version is "Ver.1". In response to a preset periodic trigger condition (executed once every 10 minutes), a task execution request is generated to execute the scheduled task of this periodic type, where the task execution request carries the target task identifier "Task_ID_i" of the scheduled task.

[0047] Obtain the task execution request, where the task execution request carries the target task identifier of the target scheduled task. This provides a search index for subsequently searching for the target task version and target execution information of the target scheduled task from the response information.

[0048] Step 104: According to the target task identifier, search for the target task version and target execution information of the target scheduled task from the response information sent by the server. The response information is obtained by the server modifying the modified scheduled task, and the response information includes the task version and execution information obtained after modifying the modified scheduled task.

[0049] The server is the server of the application, website or applet that executes the scheduled task. For example, the server of the operation and maintenance tool of the network cloud server, or for another example, the server of the database management platform, or for yet another example, the server of the project management platform.

[0050] The modified scheduled task is the scheduled task that needs to be modified. The response information is the request response information obtained by the server modifying the modified scheduled task in response to the task modification request. The response information includes the task version and execution information obtained after modifying the modified scheduled task. In the case where the target scheduled task has a task modification, the target scheduled task is the modified scheduled task; in the case where the target scheduled task has no task modification, the target scheduled task is not the modified scheduled task.

[0051] The target task version of the target scheduled task is the unique version identifier assigned after modifying the target scheduled task, including but not limited to: the target task name, the target task label, and the target task ID. The target execution information of the target scheduled task is the information of the execution content of the target scheduled task, including but not limited to: the target frequency parameter, the target command information, and the target resource instance information.

[0052] Before step 104, the following specific steps are further included: sending a task modification request to the server to instruct the server to modify the modified scheduled task, and receiving the response information sent by the server. Sending the task modification request can be specifically implemented through an application programming interface. The response information in this step includes the modified task version and execution information. Among them, modifying the modified scheduled task specifically refers to modifying the execution information of the modified scheduled task and updating the task version. Modifying the execution information of the modified scheduled task includes, but is not limited to: modifying the frequency parameter, modifying the command content, modifying the command information, modifying the resource instance information, and modifying the resource instance.

[0053] Optionally, after step 104, the following specific steps are further included:

[0054] In the case where the target task version and target execution information of the target scheduled task are not found, it is determined that the target scheduled task has not been modified, and the target scheduled task is continued to be executed.

[0055] Optionally, after step 104, the following specific steps are further included:

[0056] In the case where the target task version is the same as the current task version of the target scheduled task, the target scheduled task of the current task version is continued to be executed.

[0057] Exemplarily, through the API-UpdateInvocation interface, a task modification request is sent to the server of the operation and maintenance tool of the network cloud server to instruct the server to modify the scheduled task Task_i, and the response information sent by the server through the API-UpdateInvocation interface is received: the resource instance information "Instance_ID_1", and the newly added resource instance information "Instance_ID_2", the command information is "CommandContent_2", the frequency parameter is "00 / 20***?(execute once every 20 minutes)", the task identifier is "Task_ID_i", the task version number is incremented by 1, and it is currently "Ver.2". According to the target task identifier "Task_ID_i", the target task version "Ver.2" and target execution information of the scheduled task Task_i are found from the response information: the resource instance information "Instance_ID_1" and "Instance_ID_2", the command information "CommandContent_2", and the frequency parameter "00 / 20***?".

[0058] According to the target task identifier, find the target task version and target execution information of the target scheduled task from the response information sent by the server. The response information is obtained by the server modifying the modified scheduled task, and the response information includes the task version and execution information obtained after modifying the modified scheduled task. It provides a version basis for subsequent judgment on whether the target scheduled task is modified, and provides data support for the execution information of the target scheduled task after modification for subsequent execution.

[0059] Step 106: In the case where the target task version is different from the current task version of the target scheduled task, interrupt the execution of the target scheduled task of the current task version, and execute the target scheduled task of the target task version based on the target execution information.

[0060] The current task version of the target scheduled task is the unique version identifier of the target scheduled task during the current execution process. When the current task version is the same as the target scheduled version, it indicates that the target scheduled task has not been modified. When the current task version is different from the target scheduled version, it indicates that the target scheduled task has been modified.

[0061] Specifically, taking the sequential moments T1 - T2 - T3 - T4 as an example: At moment T1, step 102 is executed to obtain a task execution request and start executing the scheduled task. The task version of the scheduled task at moment T1 is "Version 1". At moment T2, the scheduled task is modified, and the task version of the modified scheduled task is "Version 2". At moment T3, step 104 is executed to find the task version "Version 2" from the response information. At moment T4, step 106 is executed. The current task version of the scheduled task during the execution process is "Version 1", and the scheduled version of the current scheduled version "Version 1" needs to be replaced and executed with the scheduled version of the scheduled version "Version 2".

[0062] Execute the target scheduled task of the target task version based on the target execution information. The specific method is: based on the target execution information, obtain the information of the execution content of the target scheduled task, where the information of the execution content includes: the target frequency parameter, target command information, and target resource instance information of the target task version, and execute the target scheduled task of the target task version. Further, based on the target execution information, obtaining the target frequency parameter, target command information, and target resource instance information of the target task version can be to extract the target frequency parameter, target command information, and target resource instance information of the target task version based on the target execution information, or to pull the target frequency parameter, target command information, and target resource instance information of the target task version from the server based on the target execution information, which is not limited here.

[0063] Optionally, after step 106, the following specific steps are further included:

[0064] Obtain the task execution result and store the task execution result.

[0065] When storing the task execution result as a local file, distinguish by attaching the task version to the file name. For example, [<Common command name>-]<Task ID>[.iv<Task digital version>].<Command type extension>.

[0066] When reporting the task execution result, the task version can also be reported, so that the data storage can record the task version of the task.

[0067] Exemplarily, the target task version "Ver.2" is different from the current task version "Ver.1" of the target scheduled task. Interrupt the execution of the target scheduled task Task_i with the current task version "Ver.1", and extract the target frequency parameter "00 / 20***?", target command information "CommandContent_2", and target resource instance information "Instance_ID_1" and "Instance_ID_2" from the target execution information. According to the target frequency parameter, target command information, and target resource instance information, execute the scheduled task Task_i of the target task version "Ver.2".

[0068] In the embodiments of this specification, obtain a task execution request, where the task execution request carries the target task identifier of the target scheduled task; according to the target task identifier, find the target task version and target execution information of the target scheduled task from the response information sent by the server, where the response information is obtained by the server modifying the scheduled task, and the response information includes the task version and execution information obtained after modifying the scheduled task; in the case where the target task version is different from the current task version of the target scheduled task, interrupt the execution of the target scheduled task with the current task version, and execute the target scheduled task of the target task version based on the target execution information. The task version of the scheduled task is introduced. When it is necessary to execute the target scheduled task, only find the modified target task version and target execution information in the response information. In the case where the target task version is different from the current task version, the execution of the target scheduled task with the current task version can be interrupted, and based on the modified target execution information, the target scheduled task of the target task version can be re-executed. Through the iteration of different versions of the scheduled task, under the action of the interruption mechanism, the modification of the scheduled task during the execution process is realized, the flexibility of the scheduled task is improved, and the usability and scalability of task execution are improved.

[0069] In an optional embodiment of this specification, before step 104, the following specific steps are further included:

[0070] Obtain the task identifier of the modified scheduled task and the modified execution information;

[0071] Generate and send a task modification request to the server based on the task identifier and modification execution information, where the task modification request is used to instruct the server to modify the modified scheduled task to obtain response information;

[0072] Receive the response information sent by the server.

[0073] The embodiments of this specification can be executed after step 102. For example, if the target scheduled task is of the periodic type, the embodiments of this specification are executed within the i-th cycle of the execution of the target scheduled task to complete the modification of the target scheduled task. After the task execution request in the (i + 1)-th cycle, the modified target scheduled task starts to be executed. The embodiments of this specification can also be executed before step 102. For example, if the target scheduled task is of the start trigger type, the modification of the target scheduled task is completed before startup. Once the client starts, the modified target scheduled task starts to be executed directly.

[0074] The task identifier of the modified scheduled task is an identifier for uniquely identifying and managing the modified scheduled task, including but not limited to: task name, task label, and task ID.

[0075] The modification execution information of the modified scheduled task is the execution information for modifying and replacing the execution information of the modified scheduled task, and is the information of the execution content of the modified scheduled task, including but not limited to: modification frequency parameter, modification command information, and modification resource instance information.

[0076] The task modification request is an instruction request for modifying the execution information of the modified scheduled task.

[0077] The response information is the request response information obtained by the server in response to the task modification request for modifying the modified scheduled task. The response information includes but not limited to: request identifier, task version obtained after modifying the modified scheduled task, and execution information. Among them, the request identifier is the unique identifier of the instruction request, and the modified execution information includes but not limited to: command identifier (ID), as specifically shown in Table 2 below.

[0078] Sending the task modification request and receiving the response information sent by the server can be specifically implemented through an application programming interface.

[0079] Generate a task modification request based on the task identifier and modification execution information. The specific method is as follows: Determine the task identifier and modification execution information as the request information, and generate a task modification request based on the request information. The request information includes, but is not limited to: system-specified parameters, geographical identifier (ID), modification command execution identifier (ID), modification command content, encoding method of the modification command content, whether the modification command contains custom parameters, key-value pairs of custom parameters passed in when executing the modification command, modification frequency parameter of the scheduled task, and resource instance identifier. See Table 1 below for details.

[0080] The request information is specifically shown in Table 1 as follows:

[0081]

[0082]

[0083] Table 1

[0084] The response information obtained by the server for modifying the scheduled task is specifically shown in Table 2 as follows:

[0085]

[0086] Table 2

[0087] Exemplarily, obtain the task identifier "Task_ID_i" of the scheduled task sent by the user and the modification execution information: add resource instance information "Instance_ID_2", the command information is "CommandContent_2", the frequency parameter is "00 / 20***?(execute once every 20 minutes)", determine the task identifier and modification execution information as the request information, generate a task modification request based on the request information, and send the task modification request to the server of the operation and maintenance tool of the network cloud server through the API-UpdateInvocation interface, instructing the server to modify the scheduled task Task_i. After the server completes the modification, receive the response information sent by the server through the API-UpdateInvocation interface: resource instance information "Instance_ID_1", and the added resource instance information "Instance_ID_2", the command information is "CommandContent_2", the frequency parameter is "00 / 20***?(execute once every 20 minutes)", the task identifier is "Task_ID_i", and the task version number is incremented by 1 and is currently "Ver.2".

[0088] Obtain the task identifier of the modified scheduled task and the modified execution information; based on the task identifier and the modified execution information, generate and send a task modification request to the server, where the task modification request is used to instruct the server to modify the modified scheduled task to obtain a response message; receive the response message sent by the server. Generating and sending a task modification request to the server in advance based on the task identifier and the modified execution information, and obtaining the response message feedback from the server, provides an information basis for finding the target task version and target execution information of the target scheduled task, and ensures the accurate execution of the task modification.

[0089] In an optional embodiment of this specification, after generating and sending a task modification request to the server, the following specific steps are further included:

[0090] Receive the error prompt message sent by the server;

[0091] Based on the error prompt message, determine the target error information;

[0092] Modify the target error information in the modified execution information to obtain the modified modified execution information;

[0093] Return to execute the step of generating and sending a task modification request to the server based on the task identifier and the modified execution information.

[0094] After receiving the task modification request sent by the client, the server needs to verify the modified execution information to ensure that the scheduled task can be successfully executed based on the modified execution information.

[0095] The error prompt message is a prompt message sent by the server that fails to pass the verification of the modification execution information. The error prompt message is used to prompt the user that they need to modify the modification execution information to pass the verification of the modification execution information. The specific verification method is to determine whether the modification execution information conforms to the preset format. The error prompt information can be in the format of a status code (e.g., HTTP status code), can also be in the format of an error code, or can also be in the format of an error message description, which is not limited here. The error prompt information includes but is not limited to: the execution frequency of the specified scheduled task is illegal, the custom parameter name in the command is illegal, the custom parameter in the command cannot be empty, the parameter names cannot be repeated, the custom parameters passed in do not match the custom parameters defined when creating the command, the specified resource instance identifier (ID) does not support the execution of the specified command identifier (ID), the command content cannot be decoded by Base64, the resource instance identifier (ID) cannot be repeated with the resource instance identifier (ID) specified when creating the task, the number of custom parameters exceeds the limit, the type of command execution does not support the operation, the status of command execution does not support the operation, the length of the command content exceeds the upper limit, the length of the custom parameter name in the command exceeds the upper limit, the length of the specified parameter Key exceeds the maximum length that can be set, the length of the specified resource instance identifier (ID) exceeds the maximum length that can be set, the type of custom parameter value is not supported, the number of commands in the current region has exceeded the limit, modifying the public command content is prohibited, the specified command execution identifier (ID) does not exist, the specified resource instance does not exist, and an error occurs when sending the request.

[0096] The target error information is the execution information in the modification execution information that fails to pass the verification of the modification execution information. The target error information is included in the error prompt message. The target error information is used to guide the user to modify the target error information in the modification execution information to pass the verification of the modification execution information. The target error information includes but is not limited to: the execution frequency of the specified scheduled task, the custom parameter name in the command, the custom parameter in the command, the parameter name, the resource instance identifier (ID), the command content, the number of custom parameters, the type of command execution, the status of command execution, the specified parameter Key, the command execution identifier (ID), and the specified resource instance.

[0097] Based on the error prompt message, determine the target error information. The specific method is: parse the error prompt message to determine the target error information. The parsing method can be to query the message table of the error prompt message, or to extract the target error information from the error prompt message, which is not limited here.

[0098] The error prompt message is shown in Table 3:

[0099]

[0100]

[0101]

[0102] Table 3

[0103] Exemplarily, receive the error prompt message "404: InvalidInstance.NotFound, the specified instance does not exist." sent by the server. Based on the error prompt message, determine that the target error information adds the resource instance information "Instance_ID_2", modify the target error information in the modification execution information, and obtain the modified modification execution information: "Add the resource instance information "Instance_ID_3", and return to execute the step of generating and sending a task modification request to the server based on the task identifier and the modification execution information.

[0104] Receive the error prompt message sent by the server; based on the error prompt message, determine the target error information; modify the target error information in the modification execution information to obtain the modified modification execution information; return to execute the step of generating and sending a task modification request to the server based on the task identifier and the modification execution information. By timely feedback of the error prompt message and targeted modification of the target error information based on the error prompt message, the accuracy and stability of task execution are improved.

[0105] In an optional embodiment of this specification, step 102 includes the following specific steps:

[0106] Generate a task execution request according to the execution frequency corresponding to the target frequency parameter; or,

[0107] In response to the startup request of the client, generate a task execution request.

[0108] For timing tasks of different timing types, generate a task execution request through different trigger conditions to execute the timing task. Specifically, for periodic timing tasks, generate a task execution request according to the execution frequency corresponding to the target frequency parameter; for startup-triggered timing tasks, in response to the startup request of the client, generate a task execution request.

[0109] The target frequency parameter is the parameter information of the execution frequency of the target timing task. The target frequency parameter includes, but is not limited to: fixed time interval, specified time, and clock-based timing execution. The execution frequency corresponding to the target frequency parameter is the task execution frequency of the target timing task corresponding to the target frequency parameter. Among them, the fixed time interval can be represented by a Rate expression, and the clock-based timing execution can be represented by a Cron expression. For example, the target frequency parameter "00 / 10***?" means to execute once every 10 minutes, and the corresponding execution frequency is once every 10 minutes.

[0110] The startup request is an instruction request for starting the client.

[0111] Exemplarily, a task execution request is generated once every 10 minutes according to the execution frequency corresponding to the target frequency parameter "00 / 10***?(executed once every 10 minutes)", and the timed task of this cycle type is executed.

[0112] Exemplarily, in response to the startup request of the client of the operation and maintenance tool of the network cloud server, a task execution request is generated, and the timed task of this startup trigger type is executed.

[0113] A task execution request is generated according to the execution frequency corresponding to the target frequency parameter; or, a task execution request is generated in response to the startup request of the client. According to tasks of different timed types, a task execution request is triggered specifically, ensuring the adaptability between task execution and timed types.

[0114] In an optional embodiment of this specification, in step 106, executing the target timed task of the target task version based on the target execution information includes the following specific steps:

[0115] Extract the information on the execution content of the target timed task from the target execution information;

[0116] Based on the information on the execution content, execute the target timed task of the target task version.

[0117] The information on the execution content of the target timed task is the information used to define and limit the execution content of the target timed task, including but not limited to: the target frequency parameter of the target task version, the target command information, and the target resource instance information.

[0118] Extract the information on the execution content of the target timed task from the target execution information, including but not limited to: extract the target frequency parameter of the target task version from the target execution information; extract the target command information of the target task version from the target execution information; extract the target resource instance information of the target task version from the target execution information.

[0119] Based on the information on the execution content, execute the target timed task of the target task version, including but not limited to: execute the target timed task of the target task version according to the execution frequency corresponding to the target frequency parameter; pull the corresponding target command from the server according to the target command information, and execute the target timed task of the target task version through the target command; execute the target timed task of the target task version on the resource instance corresponding to the target resource instance information. There is no limitation here.

[0120] For specific examples, refer to the embodiments of the following specification.

[0121] In the embodiments of this specification, the information on the execution content of the target scheduled task is extracted from the target execution information, and based on the information on the execution content, the target scheduled task of the target task version is executed. Through the iteration of different versions of the scheduled task, under the action of the interruption mechanism, the information on the execution content of the scheduled task during the execution process is modified, improving the flexibility of the execution content of the scheduled task and enhancing the usability and scalability of task execution.

[0122] In an alternative embodiment of this specification, the steps for extracting the information on the execution content of the target scheduled task from the target execution information are as follows:

[0123] Extract the target frequency parameter of the target task version from the target execution information;

[0124] Correspondingly, the steps for executing the target scheduled task of the target task version based on the information on the execution content are as follows:

[0125] Execute the target scheduled task of the target task version at the execution frequency corresponding to the target frequency parameter.

[0126] After modifying the execution frequency of the target scheduled task, after finding the target execution information from the response information, it is necessary to further extract the target frequency parameter of the target task version from the target execution information to modify the execution frequency of task execution.

[0127] The target frequency parameter is the parameter information of the execution frequency of the target scheduled task. The target frequency parameter includes, but is not limited to: fixed time interval, specified time, and clock-based scheduled execution. The execution frequency corresponding to the target frequency parameter is the task execution frequency of the target scheduled task corresponding to the target frequency parameter. Among them, the fixed time interval can be represented by a Rate expression, and the clock-based scheduled execution can be represented by a Cron expression. For example, the target frequency parameter of "00 / 10***?" means it is executed once every 10 minutes, and the corresponding execution frequency is once every 10 minutes.

[0128] Exemplarily, extract the target frequency parameter of "00 / 10***?" of the target task version "Ver.2" from the target execution information, and execute the scheduled task Task_i of the target task version "Ver.2" at the execution frequency corresponding to the target frequency parameter of "executed once every 20 minutes".

[0129] Extract the target frequency parameter of the target task version from the target execution information; execute the target scheduled task of the target task version according to the execution frequency corresponding to the target frequency parameter. Based on the target frequency parameter in the target execution information, re-execute the target scheduled task of the target task version. Through the iteration of different versions of the scheduled task, under the action of the interruption mechanism, the execution frequency of the scheduled task during the execution process is modified, improving the flexibility of the scheduled task in frequency modification and enhancing the usability and scalability of task execution.

[0130] In an optional embodiment of this specification, to extract the information of the execution content of the target scheduled task from the target execution information, the following specific steps are included:

[0131] Extract the target command information of the target task version from the target execution information;

[0132] Correspondingly, based on the information of the execution content, execute the target scheduled task of the target task version, including the following specific steps:

[0133] According to the target command information, pull the corresponding target command from the server;

[0134] Execute the target scheduled task of the target task version through the target command.

[0135] After modifying the task content of the target scheduled task, after finding the target execution information from the response information, it is necessary to further extract the target command information of the target task version from the target execution information to modify the task content of task execution.

[0136] A command generally refers to an instruction to perform a certain operation on a system or application program. It can be a simple console command or a complex script or program. Commands are mainly used to execute various management tasks, such as starting a service, stopping a service, updating a configuration file, checking the system status, etc.

[0137] The target command information is the information of the task content of the target scheduled task. The target command information includes, but is not limited to: command identifier, command execution identifier, command content, encoding method of the command content, whether the command contains custom parameters, and key-value pairs of the custom parameters passed in when executing the command. It should be noted that the modification of the command identifier in the target execution information can follow the following modification principles: 1. Only when the command content changes, a new command is added and the identifier of the newly added command is returned. 2. When the command content remains unchanged, no new command is added and the identifier of the currently executing command is returned. 3. If the command execution function or the command running function is called and the command is selected to be retained, the newly added command will be retained; otherwise, when the execution is completed or the task is manually stopped, all commands associated with the scheduled task will be deleted. The corresponding target command is the task content of the target scheduled task corresponding to the target command information. For example, the target command identifier is "CommandContent_3", and the corresponding target command is: the 3rd command (CommandContent_3).

[0138] Exemplarily, from the target execution information, the target command information "CommandContent_2" of the target task version "Ver.2" is extracted. According to the target command information, the corresponding target command: the 2nd numbered command (CommandContent_2) is pulled from the server, and through the target command, the scheduled task Task_i of the target task version "Ver.2" is executed.

[0139] From the target execution information, the target command information of the target task version is extracted; according to the target command information, the corresponding target command is pulled from the server; through the target command, the target scheduled task of the target task version is executed. Based on the target command information in the target execution information, the target scheduled task of the target task version is re-executed. Through the iteration of different versions of the scheduled task, under the action of the interruption mechanism, the modification of the task content of the scheduled task during the execution process is realized, the flexibility of the scheduled task in command modification is improved, and the usability and scalability of task execution are improved.

[0140] In an optional embodiment of this specification, to extract the information of the execution content of the target scheduled task from the target execution information, the following specific steps are included:

[0141] Extract the target resource instance information of the target task version from the target execution information;

[0142] Correspondingly, based on the information of the execution content, to execute the target scheduled task of the target task version, the following specific steps are included:

[0143] On the resource instance corresponding to the target resource instance information, execute the target scheduled task of the target task version.

[0144] After modifying the resource instance of the target scheduled task and finding the target execution information from the response information, it is necessary to further extract the target resource instance information of the target task version from the target execution information to modify the resource instance for task execution.

[0145] A resource instance usually refers to a computing resource entity, such as a virtual server, a database instance, a storage volume, etc. A resource instance represents a specific operable resource.

[0146] The target resource instance information is the information of the resource instance for executing the target scheduled task. The target resource instance information includes, but is not limited to: the resource instance specification and the resource instance identifier. The resource instance corresponding to the target resource instance information is the resource instance for executing the target scheduled task corresponding to the target resource instance information. For example, the target resource instance information is: the resource instance information "Instance_ID_1" and the newly added resource instance information "Instance_ID_2", and the corresponding target command is: the resource instances numbered 1 and 2 (Instance_1 and Instance_2).

[0147] It should be noted that since a new resource instance is obtained by modification, the client will notify all resource instances to modify the task version to the target task version to ensure that the execution of the modified new resource instance is naturally compatible with the execution queue. The unified task version also ensures that the task executions on each resource instance do not interfere with each other and are independent of each other.

[0148] Exemplarily, extract the target resource instance information of the target task version "Ver.2" from the target execution information: the resource instance information "Instance_ID_1" and the newly added resource instance information "Instance_ID_2", and execute the scheduled task Task_i of the target task version "Ver.2" on the resource instances numbered 1 and 2 (Instance_1 and Instance_2).

[0149] Extract the target resource instance information of the target task version from the target execution information; execute the target scheduled task of the target task version according to the resource instance corresponding to the target resource instance information. Based on the target resource instance information in the target execution information, re-execute the target scheduled task of the target task version. Through the iteration of different versions of the scheduled task, under the action of the interruption mechanism, the modification of the resource instance of the scheduled task during the execution process is realized, the flexibility of the scheduled task in resource instance modification is improved, and the usability and scalability of task execution are improved.

[0150] See Figure 2 , Figure 2The flowchart of another task execution method provided by an embodiment of this specification is shown, which is applied to the server side and includes the following specific steps:

[0151] Step 202: Obtain a task modification request, where the task modification request carries the task identifier for modifying the scheduled task and the modification execution information.

[0152] The server side is the server side of an application, website, or applet that executes scheduled tasks. For example, the server side of an operation and maintenance tool for a network cloud server, or the server side of a database management platform, or the server side of a project management platform. Users can modify the scheduled tasks being executed through a specific Application Programming Interface (API) on the client side, and the modification processing is specifically implemented on the server side, such as OpenAPI.

[0153] The scheduled task is a script task that executes at a specific time point or according to a specific frequency.

[0154] Modifying the scheduled task is the scheduled task that needs to be modified.

[0155] The task identifier for modifying the scheduled task is an identifier for uniquely identifying and managing the modified scheduled task, including but not limited to: task name, task label, and task ID.

[0156] The modification execution information for modifying the scheduled task is the execution information for modifying the execution information of the modified scheduled task, and is the information for modifying the execution content of the modified scheduled task, including but not limited to: modified frequency parameter, modified command information, and modified resource instance information.

[0157] Obtaining the task modification request can be a task modification request automatically triggered and generated by the server side, or a task modification request received from the client side, which is not limited here.

[0158] Exemplarily, on the server side of the operation and maintenance tool of the network cloud server, a task modification request sent by the client through the API-UpdateInvocation interface is received, where the task modification request carries the task identifiers "Task_1", "Task_2"... "Task_n" for modifying the scheduled tasks (Task_1, Task_2... Task_n) and the modification execution information: (Task_1: modified frequency parameter, modified command information, and modified resource instance information), (Task_2: modified frequency parameter, modified command information, and modified resource instance information)... (Task_n: modified frequency parameter, modified command information, and modified resource instance information).

[0159] Obtain a task modification request, where the task modification request carries the task identifier for modifying the scheduled task and the modification execution information. This provides a search index and a basis for modification for subsequent modification of the scheduled task.

[0160] Step 204: Modify the scheduled task according to the task identifier and the modification execution information to obtain the task version and execution information of the modified scheduled task.

[0161] In an optional embodiment of this specification, step 204 includes the following specific steps:

[0162] Determine the execution information of the scheduled task of the current task version according to the task identifier;

[0163] Modify the execution information of the scheduled task of the current task version according to the modification execution information, where the execution information includes any one of the frequency parameter, command information, and resource instance information;

[0164] Update the task version of the modified scheduled task.

[0165] Optionally, before step 204, the following specific steps are further included:

[0166] Verify the modification execution information.

[0167] The specific verification method is to determine whether the modification execution information conforms to a preset format.

[0168] Exemplarily, determine the execution information of the scheduled task of the current task version "Ver.M" according to the task identifiers "Task_1", "Task_2",..., "Task_n": (Task_1: frequency parameter, command information, and resource instance information of "Ver.M"), (Task_2: frequency parameter, command information, and resource instance information of "Ver.M"),..., (Task_n: frequency parameter, command information, and resource instance information of "Ver.M"), according to the modification execution information: (Task_1: modified frequency parameter, modified command information, and modified resource instance information), (Task_2: modified frequency parameter, modified command information, and modified resource instance information),..., (Task_n: modified frequency parameter, modified command information, and modified resource instance information), modify the execution information of the scheduled task of the current task version to obtain the modified execution information of the scheduled task: (Task_1: frequency parameter, command information, and resource instance information of "Ver.M+1"), (Task_2: frequency parameter, command information, and resource instance information of "Ver.M+1"),..., (Task_n: frequency parameter, command information, and resource instance information of "Ver.M+1"), and update the task version to "Ver.M+1".

[0169] Modify the modified scheduled task according to the task identifier and modification execution information to obtain the task version and execution information of the modified scheduled task, providing an information data basis for subsequent generation of response information.

[0170] Step 206: Generate response information based on the task version and execution information.

[0171] The response information is the request response information obtained by the server in response to the task modification request for modifying the modified scheduled task. The response information includes the task version and execution information obtained after modifying the modified scheduled task. See specifically Figure 1 Table 2 in the embodiments of the specification.

[0172] Exemplarily, based on the task version "Ver.M+1" and execution information updated for the modified scheduled task: (Task_1: frequency parameter, command information, and resource instance information of "Ver.M+1"), (Task_2: frequency parameter, command information, and resource instance information of "Ver.M+1")... (Task_n: frequency parameter, command information, and resource instance information of "Ver.M+1"), generate the response information: for the modified scheduled task Task_i; the resource instance information "Instance_ID_1", and the newly added resource instance information "Instance_ID_2", the command information is "CommandContent_2", the frequency parameter is "00 / 20***?(execute once every 20 minutes)", the task identifier is "Task_ID_i", and the task version number is incremented by 1 and is currently "Ver.2".

[0173] Generate response information based on the task version and execution information, providing an information basis for subsequent sending to the client to instruct the client to interrupt the execution of the target scheduled task of the current task version and execute the target scheduled task of the target task version when it is determined that the target task version of the target scheduled task is different from the current task version, ensuring the accurate execution of the task modification.

[0174] Step 208: Send the response information to the client, where the response information is used to instruct the client to interrupt the execution of the target scheduled task of the current task version and execute the target scheduled task of the target task version when it is determined that the target task version of the target scheduled task is different from the current task version.

[0175] The target scheduled task is the scheduled task to be executed. The target task version of the target scheduled task is the unique version identifier assigned after modifying the target scheduled task.

[0176] The current task version of the target scheduled task is the unique version identifier of the target scheduled task during the current execution process. When the current task version is the same as the target scheduled version, it indicates that the target scheduled task has not been modified. When the current task version is different from the target scheduled version, it indicates that the target scheduled task has been modified.

[0177] The client is the client of the application, website or applet that executes the scheduled task. For example, the client of the operation and maintenance tool of the network cloud server, or the client of the database management platform, or the client of the project management platform.

[0178] Send the response information to the client, which can be specifically implemented through the application programming interface.

[0179] Exemplarily, through the API-UpdateInvocation interface, send the response information to the client of the operation and maintenance tool of the network cloud server: the resource instance information "Instance_ID_1", and the newly added resource instance information "Instance_ID_2", the command information is "CommandContent_2", the frequency parameter is "00 / 20***?(Execute once every 20 minutes)", the task identifier is "Task_ID_i", the task version number is incremented by 1, and it is currently "Ver.2".

[0180] In the embodiments of this specification, obtain a task modification request, where the task modification request carries the task identifier for modifying the scheduled task and the modification execution information; according to the task identifier and the modification execution information, modify the modified scheduled task to obtain the task version and execution information of the modified scheduled task; generate response information based on the task version and the execution information; send the response information to the client, where the response information is used to instruct the client to interrupt the execution of the target scheduled task of the current task version and execute the target scheduled task of the target task version when it is determined that the target task version of the target scheduled task is different from the current task version. By introducing the task version of the scheduled task, after modifying the modified scheduled task, obtain the task version and execution information of the modified scheduled task to generate response information. During the subsequent task execution process, instruct the client to interrupt the execution of the target scheduled task of the current task version and execute the target scheduled task of the target task version when it is determined that the target task version of the target scheduled task is different from the current task version. Through the iteration of different versions of the scheduled task and the action of the interruption mechanism, the modification of the scheduled task during the execution process is realized, the flexibility of the scheduled task is improved, and the usability and scalability of task execution are improved.

[0181] In an optional embodiment of this specification, step 204 includes the following specific steps:

[0182] In the case where the modified execution information conforms to the preset format, modify the modified scheduled task according to the task identifier and the modified execution information, and obtain the task version and execution information of the modified scheduled task.

[0183] The preset format is the verification format of the execution information set in advance, including but not limited to: whether the execution frequency of the specified scheduled task is legal, whether the custom parameter name in the command is legal, whether the custom parameter in the command is empty, whether the parameter names are repeated, whether the passed custom parameter matches the custom parameter defined when creating the command, whether the specified resource instance identifier (ID) supports executing the specified command identifier (ID), whether the command content passes Base64 decoding, whether the resource instance identifier (ID) is repeated with the resource instance identifier (ID) specified when creating the task, whether the number of custom parameters exceeds the limit, whether the type of execution of this command supports the operation, whether the status of execution of this command supports the operation, whether the length of the command content exceeds the upper limit, whether the length of the custom parameter name in the command exceeds the upper limit, whether the specified parameter Key length exceeds the maximum length that can be set, whether the type of custom parameter value is supported, whether the number of commands in the current region exceeds the limit, whether the public command content is modified, whether the specified command execution identifier (ID) exists, whether the specified resource instance exists, and whether an error occurs when sending the request. See specifically Figure 1 Table 3 in the embodiment, which will not be elaborated here.

[0184] Modify the modified scheduled task according to the task identifier and the modified execution information, and obtain the task version and execution information of the modified scheduled task. The specific method is as described in step 204 above, which will not be elaborated here.

[0185] Exemplarily, when the modification execution information (Task_1: modify frequency parameter, modify command information, and modify resource instance information), (Task_2: modify frequency parameter, modify command information, and modify resource instance information), ……, (Task_n: modify frequency parameter, modify command information, and modify resource instance information) conforms to the preset format, according to the task identifiers "Task_1", "Task_2", ……, "Task_n" and the modification execution information, the execution information of the modified scheduled task for the current task version "Ver.M": (Task_1: frequency parameter, command information, and resource instance information of "Ver.M"), (Task_2: frequency parameter, command information, and resource instance information of "Ver.M"), ……, (Task_n: frequency parameter, command information, and resource instance information of "Ver.M") is modified to obtain the updated task version "Ver.M + 1" of the modified scheduled task and the execution information: (Task_1: frequency parameter, command information, and resource instance information of "Ver.M + 1"), (Task_2: frequency parameter, command information, and resource instance information of "Ver.M + 1"), ……, (Task_n: frequency parameter, command information, and resource instance information of "Ver.M + 1").

[0186] When the modification execution information conforms to the preset format, according to the task identifier and the modification execution information, the modified scheduled task is modified to obtain the task version and execution information of the modified scheduled task. It provides a more accurate and effective information data basis for subsequent generation of response information, and improves the accuracy and stability of task execution.

[0187] In an optional embodiment of this specification, the method further includes the following specific steps:

[0188] When the modification execution information does not conform to the preset format, an error prompt message is sent to the client, where the error prompt message is used to instruct the client to modify the target error information in the modification execution information.

[0189] The error prompt message is a prompt message sent by the server that fails the verification of the modification execution information. The error prompt message is used to prompt the user that they need to modify the modification execution information to pass the verification of the modification execution information. The specific verification method is to determine whether the modification execution information conforms to the preset format. The error prompt information can be in the format of a status code (for example, an HTTP status code), or in the format of an error code, or in the format of an error message description, which is not limited here. Specifically, refer to Table 3 in the above Figure 1 embodiment, which will not be elaborated here.

[0190] The target error message is to modify the modification execution information that does not conform to the preset format in the execution information, and the target error message is included in the error prompt message. The target error message is used to guide the user to modify the target error message in the modification execution information to pass the verification of the modification execution information. See Table 3 in the above Figure 1 Example for details, which will not be elaborated here.

[0191] Exemplarily, when the modification execution information (Task_1: modify frequency parameter, modify command information, and modify resource instance information), (Task_2: modify frequency parameter, modify command information, and modify resource instance information)... (Task_n: modify frequency parameter, modify command information, and modify resource instance information) does not conform to the preset format, an error prompt message "404: InvalidInstance.NotFound, the specified instance does not exist." is sent to the client, instructing the client to determine that the target error message adds the resource instance information "Instance_ID_2" based on the error prompt message, and modify the target error message in the modification execution information to obtain the modified modification execution information: "Add resource instance information "Instance_ID_3".

[0192] When the modification execution information does not conform to the preset format, an error prompt message is sent to the client, where the error prompt message is used to instruct the client to modify the target error message in the modification execution information. By promptly feedbacking the error prompt message and making targeted modifications to the target error message based on the error prompt message, it provides a more accurate and effective information data basis for generating the subsequent response information, improving the accuracy and stability of task execution.

[0193] Figure 3 The flowchart shows a task execution method provided by an embodiment of this specification, as Figure 3 shown:

[0194] Step 1: The user creates a scheduled task through the API;

[0195] Step 2: The user modifies the target scheduled task through the API;

[0196] Step 3: Determine whether the modification execution information conforms to the preset format. If not, execute Step 4; if so, execute Step 5;

[0197] Step 4: Send an error prompt message to the user;

[0198] Step 5: Determine whether resource instance information is specified. If so, execute Step 6; if not, execute Step 9;

[0199] Step 6: Add the newly added instance information to the target scheduled task, and then execute Step 7 or Step 9;

[0200] Step 7: The server sends the response information to the client, where the response information includes the task version and execution information obtained after modifying the target scheduled task;

[0201] Step 8: If the target task version is different from the current task version of the target scheduled task, interrupt the execution of the target scheduled task of the current task version, and execute the target scheduled task of the target task version based on the target execution information;

[0202] Step 9: Determine whether the command information has been modified. If so, execute Step 10; if not, execute Step 11;

[0203] Step 10: Generate a new task command, and then execute Step 7 or Step 11;

[0204] Step 11: Determine whether the frequency parameter has been modified. If so, execute Step 7; if not, execute Step 12;

[0205] Step 12: Do not modify.

[0206] Figure 4 The flow diagram of the interaction between the client and the server of a task execution method provided by an embodiment of this specification is shown as Figure 4 shown below:

[0207] At the client: Step 1: Send a task modification request to the server, where the task modification request carries the task identifier for modifying the scheduled task and the modification execution information.

[0208] At the server: Step 2: Determine whether the modification execution information conforms to the preset format; Step 3.1: If it conforms, determine the execution information of the modified scheduled task of the current task version according to the task identifier; Step 3.2: Modify the execution information of the modified scheduled task of the current task version according to the modification execution information; Step 3.3: Update the task version of the modified scheduled task; Step 3.4: Generate response information based on the task version and execution information; Step 3.5: Send the response information to the client; After Step 2, it also includes Step 4.1: If it does not conform, send an error prompt message to the client.

[0209] At the client: Step 4.2: Determine the target error information based on the error prompt message; Step 4.3: Modify the target error information in the modification execution information to obtain the modified modification execution information; Step 4.4: Generate a task modification request based on the task identifier and the modification execution information; Step 4.5: Return to execute Step 1.

[0210] On the client side: Step 5: Generate a task execution request according to the execution frequency corresponding to the target frequency parameter; or, in response to the startup request of the client, generate a task execution request, where the task execution request carries the target task identifier of the target scheduled task; Step 6: According to the target task identifier, find the target task version and target execution information of the target scheduled task from the response information; Step 7: In the case where the target task version is different from the current task version of the target scheduled task, interrupt the execution of the target scheduled task of the current task version; Step 8: Execute the target scheduled task of the target task version based on the target execution information.

[0211] Figure 5 The figure shows a front-end schematic diagram of task modification of a task execution method provided by an embodiment of this specification, as Figure 5 shown:

[0212] In the scheduled task interface of the network cloud server, it includes a "Create / Modify Task" control, a search input box, a "Task Status" selection control, and a "Filter Condition" selection control. After the user enters keywords in the search input box, selects the task status through the "Task Status" selection control, and / or selects the filter condition through the "Filter Condition" selection control, and then clicks the "Create / Modify Task" control, the search results are displayed: {Task A (task identifier), In execution (task status), Cycle type (scheduled type), Task version (2)}, {Task B (task identifier), Completed (task status), Startup trigger type (scheduled type), Task version (3)}, {Task C (task identifier), Not executed (task status), Immediate execution type (scheduled type), Task version (1)}. The user clicks the "Modify / Edit" control in the operation bar to jump to the modify scheduled task interface.

[0213] In the modify scheduled task interface, under the scheduled type, it includes: cycle type, startup trigger type, and immediate execution type, and the user selects the cycle type. Under the modify execution information, it includes: command information, command content, frequency parameter, select resource instance (resource instance a, resource instance b, and resource instance c). Under the advanced settings, it includes: file name and file storage path.

[0214] See Figure 6 , Figure 6 The figure shows a flowchart of a scheduled operation and maintenance method provided by an embodiment of this specification, which is applied to the client of the operation and maintenance tool and includes the following specific steps:

[0215] Step 602: Receive the task execution request of the scheduled operation and maintenance task sent by the front end, where the task execution request carries the target task identifier of the target scheduled operation and maintenance task;

[0216] Step 604: According to the target task identifier, find the target task version and target execution information of the target scheduled operation and maintenance task from the response information sent by the server, where the response information is obtained by the server modifying the modified scheduled operation and maintenance task, and the response information includes the task version and execution information obtained after modifying the modified scheduled operation and maintenance task;

[0217] Step 606: In the case where the target task version is different from the current task version of the target scheduled operation and maintenance task, interrupt the execution of the target scheduled operation and maintenance task of the current task version, and execute the target scheduled operation and maintenance task of the target task version based on the target execution information.

[0218] An operation and maintenance tool is an application designed specifically for operation and maintenance personnel. It usually includes functions such as centralized management, monitoring, configuration, and automated operation and maintenance operations for various operation and maintenance objects such as network devices, servers, databases, and middleware. For example, an operation and maintenance tool for a database, an operation and maintenance tool for a server, or an operation and maintenance tool for a network device.

[0219] The client of the operation and maintenance tool refers to an interface or application running on the local computer, mobile device, or web browser of the operation and maintenance personnel, allowing the operation and maintenance personnel to remotely control and manage the various services provided by the operation and maintenance tool through a visual interface or API interface, such as creating, editing, scheduling, and monitoring scheduled operation and maintenance tasks.

[0220] A scheduled operation and maintenance task is a series of operation and maintenance operations set in the operation and maintenance tool and automatically executed according to a predetermined time or frequency. For example, it can be a task for regularly backing up a database, a task for checking server performance metrics and generating reports every morning, or a task for restarting a group of specific servers every week to ensure stability.

[0221] The target scheduled operation and maintenance task refers to the scheduled operation and maintenance task that needs to be executed, which is the specific scheduled operation and maintenance task entity pointed to by the task execution request. Its target task identifier is used to uniquely identify this task so that the system can accurately find and process the corresponding task version and execution content.

[0222] Modifying a scheduled operation and maintenance task refers to the scheduled operation and maintenance task that needs to be modified. It is a process in which operation and maintenance personnel edit and update an existing scheduled operation and maintenance task through the client of the operation and maintenance tool. This may involve changing attributes such as the execution frequency, command content, and resource instances to which the task applies. After the modification is completed, the server will generate a new task version for this task.

[0223] This embodiment of the specification and Figure 1 The embodiments are under the same inventive concept. For the specific manners of steps 602 to 606, refer to steps 102 to 106, which will not be elaborated here.

[0224] Exemplarily, on the client side of the network cloud operation and maintenance tool, the operation and maintenance personnel send a task execution request through the front-end API interface to execute the timed database backup task named "DB_Backup_Task", and the target task identifier of this task is "Task_ID_DB_Backup". After receiving the request, the server searches for the "Ver.3" version generated after the task was last modified according to "Task_ID_DB_Backup", as well as the corresponding execution information, such as backup frequency, backup command, and the list of database instances involved. If the task has been modified, then the system will use the backup frequency, backup command, and database instances involved in the "Ver.3" version to execute the timed database backup task of "DB_Backup_Task".

[0225] In the embodiments of this specification, a task execution request for a timed operation and maintenance task sent by the front end is received, where the task execution request carries the target task identifier of the target timed operation and maintenance task; according to the target task identifier, the target task version and target execution information of the target timed operation and maintenance task are searched from the response information sent by the server, where the response information is obtained by the server modifying the timed operation and maintenance task, and the response information includes the task version and execution information obtained after modifying the timed operation and maintenance task; in the case where the target task version is different from the current task version of the target timed operation and maintenance task, the execution of the target timed operation and maintenance task of the current task version is interrupted, and the target timed operation and maintenance task of the target task version is executed based on the target execution information. By introducing the task version of the timed operation and maintenance task, when it is necessary to execute the target timed operation and maintenance task, only the modified target task version and target execution information need to be searched in the response information. In the case where the target task version is different from the current task version, the execution of the target timed operation and maintenance task of the current task version can be interrupted, and based on the modified target execution information, the target timed operation and maintenance task of the target task version can be re-executed. Through the iteration of different versions of the timed operation and maintenance task, under the action of the interruption mechanism, the modification of the timed operation and maintenance task during the execution process is realized, the flexibility of the timed operation and maintenance task is improved, and the usability and scalability of operation and maintenance are improved.

[0226] The following combination of attached Figure 7 figures, taking the application of the task execution method provided in this specification in the operation and maintenance of network cloud servers as an example, further illustrates the task execution method. Among them, Figure 7 FIG. shows the processing procedure flowchart of a task execution method provided in an embodiment of this specification, which is applied to the client of the operation and maintenance tool of the network cloud server and includes the following specific steps:

[0227] Step 702: Receive the task identifier of the scheduled operation and maintenance task to be modified and the modification execution information input by the user on the front-end interface. Based on the task identifier and the modification execution information, generate and send a task modification request to the server;

[0228] Step 704: Receive the error prompt message sent by the server. Based on the error prompt message, determine the target error information, render the target error information on the front-end interface, receive the user's modification of the target error information in the modification execution information to obtain the modified modification execution information, and based on the task identifier and the modified modification execution information, generate and send a task modification request to the server;

[0229] Step 706: Receive the response information sent by the server, where the response information includes the updated task version and execution information obtained after modifying the scheduled operation and maintenance task to be modified;

[0230] Step 708: Generate a task execution request according to the execution frequency corresponding to the target frequency parameter, where the task execution request carries the target task identifier of the target scheduled operation and maintenance task;

[0231] Step 710: According to the target task identifier, find the target task version and target execution information of the target scheduled operation and maintenance task from the response information sent by the server;

[0232] Step 712: In the case where the target task version is different from the current task version of the target scheduled operation and maintenance task, interrupt the execution of the target scheduled operation and maintenance task of the current task version;

[0233] Step 714: Extract the target frequency parameter, target command information, and target resource instance information of the target task version from the target execution information;

[0234] Step 716: Pull the corresponding target command from the server according to the target command information;

[0235] Step 718: Execute the target scheduled operation and maintenance task of the target task version on the resource instance corresponding to the target resource instance information through the target command according to the execution frequency corresponding to the target frequency parameter.

[0236] Currently, the scheduled operation and maintenance tasks on the operation and maintenance tool do not support modifying the execution information or resource instances during the execution process, which to a certain extent limits the flexibility of the scheduled operation and maintenance tasks. Users can only modify the scheduled operation and maintenance tasks by stopping the current scheduled operation and maintenance task and re-creating and executing them, and once the scheduled operation and maintenance task is created, the resource instance cannot be modified anymore.

[0237] In the embodiments of this specification, the task version of the timed operation and maintenance task is introduced. When it is necessary to execute the target timed operation and maintenance task, only the modified target task version and target execution information need to be searched in the response information. When the target task version is different from the current task version, the execution of the target timed operation and maintenance task of the current task version can be interrupted, and based on the modified target execution information, the target timed operation and maintenance task of the target task version can be re-executed. Through the iteration of different versions of the timed operation and maintenance task, under the action of the interruption mechanism, the modification of the timed operation and maintenance task during the execution process is realized, the flexibility of the timed operation and maintenance task is improved, and the usability and scalability of operation and maintenance are improved.

[0238] Corresponding to the above method embodiments, this specification also provides embodiments of a task execution system. Figure 8 The structural schematic diagram of a task execution system provided by an embodiment of this specification is shown. As Figure 8 shown, the system includes a server 802 and a client 804;

[0239] The server 802 is configured to receive a task modification request sent by the client 804, where the task modification request carries a task identifier for modifying the timed task and modified execution information; modify the modified timed task according to the task identifier and the modified execution information to obtain the task version and execution information of the modified timed task; generate a response information based on the task version and the execution information; and send the response information to the client 804;

[0240] The client 804 is configured to obtain a task execution request, where the task execution request carries a target task identifier of the target timed task; search for the target task version and target execution information of the target timed task from the response information sent by the server 802 according to the target task identifier; when the target task version is different from the current task version of the target timed task, interrupt the execution of the target task of the current task version, and execute the target task of the target task version based on the target execution information.

[0241] In the embodiments of this specification, the task version of the timed task is introduced. After the server modifies the modified timed task, it obtains the task version and execution information of the modified timed task to generate the response information. When it is necessary to execute the target timed task, only the modified target task version and target execution information need to be searched in the response information. When the target task version is different from the current task version, the execution of the target task of the current task version can be interrupted, and based on the modified target execution information, the target task of the target task version can be re-executed. Through the iteration of different versions of the timed task, under the action of the interruption mechanism, the modification of the timed task during the execution process is realized, the flexibility of the timed task is improved, and the usability and scalability of task execution are improved.

[0242] The above is a schematic solution of a task execution system according to this embodiment. It should be noted that the technical solution of this task execution system and the technical solution of the above task execution method belong to the same concept. For the details not described in the technical solution of the task execution system, reference can be made to the description of the technical solution of the above task execution method.

[0243] Corresponding to the above method embodiment, this specification also provides an embodiment of a task execution device. Figure 9 The following shows a schematic structural diagram of a task execution device provided by an embodiment of this specification. As Figure 9 shown, this device is applied to a client and includes:

[0244] A first acquisition module 902, configured to acquire a task execution request, where the task execution request carries a target task identifier of a target scheduled task;

[0245] A first search module 904, configured to search for a target task version and target execution information of the target scheduled task from the response information sent by the server according to the target task identifier, where the response information is obtained by the server modifying the modified scheduled task, and the response information includes the task version and execution information obtained after modifying the modified scheduled task;

[0246] A first execution module 906, configured to, when the target task version is different from the current task version of the target scheduled task, interrupt the execution of the target scheduled task of the current task version, and execute the target scheduled task of the target task version based on the target execution information.

[0247] Optionally, this device further includes:

[0248] A first modification module, configured to acquire a task identifier of the modified scheduled task and modified execution information; generate and send a task modification request to the server based on the task identifier and the modified execution information, where the task modification request is used to instruct the server to modify the modified scheduled task to obtain response information; and receive the response information sent by the server.

[0249] Optionally, this device further includes:

[0250] An error modification module, configured to receive an error prompt message sent by the server, where the error prompt message is a prompt message sent by the server that fails to pass the verification of the modified execution information; determine target error information based on the error prompt message, where the target error information is the execution information in the modified execution information that fails to pass the verification of the modified execution information; modify the target error information in the modified execution information to obtain the modified modified execution information; and return to execute the step of generating and sending a task modification request to the server based on the task identifier and the modified execution information.

[0251] Optionally, the first acquisition module 902 is further configured to:

[0252] Generate a task execution request according to the execution frequency corresponding to the target frequency parameter; or generate a task execution request in response to a startup request from the client.

[0253] Optionally, the first execution module 906 is further configured to:

[0254] Extract information on the execution content of the target scheduled task from the target execution information; and execute the target scheduled task of the target task version based on the information on the execution content.

[0255] Optionally, the first execution module 906 is further configured to:

[0256] Extract the target frequency parameter of the target task version from the target execution information; and execute the target scheduled task of the target task version according to the execution frequency corresponding to the target frequency parameter.

[0257] Optionally, the first execution module 906 is further configured to:

[0258] Extract the target command information of the target task version from the target execution information; pull the corresponding target command from the server according to the target command information; and execute the target scheduled task of the target task version through the target command.

[0259] Optionally, the first execution module 906 is further configured to:

[0260] Extract the target resource instance information of the target task version from the target execution information; and execute the target scheduled task of the target task version on the resource instance corresponding to the target resource instance information.

[0261] In the embodiments of this specification, the task version of the scheduled task is introduced. When it is necessary to execute the target scheduled task, only the modified target task version and target execution information need to be found in the response information. When the target task version is different from the current task version, the execution of the target scheduled task of the current task version can be interrupted, and based on the modified target execution information, the target scheduled task of the target task version can be re-executed. Through the iteration of different versions of the scheduled task, under the action of the interruption mechanism, the modification of the scheduled task during the execution process is realized, the flexibility of the scheduled task is improved, and the usability and scalability of task execution are improved.

[0262] The above is a schematic solution of a task execution device according to this embodiment. It should be noted that the technical solution of this task execution device and the technical solution of the above task execution method belong to the same concept. For the details not described in the technical solution of the task execution device, reference can be made to the description of the technical solution of the above task execution method.

[0263] Corresponding to the above method embodiment, this specification also provides an embodiment of a task execution device. Figure 10 The following shows a schematic structural diagram of another task execution device provided by an embodiment of this specification. As Figure 10 shown, this device is applied to a server and includes:

[0264] A second acquisition module 1002, configured to acquire a task modification request, where the task modification request carries a task identifier for modifying a scheduled task and modification execution information;

[0265] A second modification module 1004, configured to modify the modified scheduled task according to the task identifier and the modification execution information to obtain a task version and execution information of the modified scheduled task;

[0266] A generation module 1006, configured to generate response information based on the task version and the execution information;

[0267] A sending module 1008, configured to send the response information to a client, where the response information is used to instruct the client to interrupt the execution of the target scheduled task of the current task version and execute the target scheduled task of the target task version when it is determined that the target task version of the target scheduled task is different from the current task version.

[0268] Optionally, the second modification module 1004 is further configured to:

[0269] When the modification execution information conforms to a preset format, modify the modified scheduled task according to the task identifier and the modification execution information to obtain a task version and execution information of the modified scheduled task.

[0270] Optionally, this device further includes:

[0271] An error prompt module, configured to send an error prompt message to the client when the modification execution information does not conform to the preset format, where the error prompt message is used to instruct the client to modify the target error information in the modification execution information.

[0272] Optionally, the second modification module 1004 is further configured to:

[0273] Determine the execution information of the modified scheduled task for the current task version according to the task identifier; modify the execution information of the modified scheduled task for the current task version according to the modified execution information, where the execution information includes any one of a frequency parameter, command information, and resource instance information; update the task version of the modified scheduled task.

[0274] In the embodiments of this specification, the task version of the scheduled task is introduced. After modifying the modified scheduled task, the task version and execution information of the modified scheduled task are obtained to generate response information. During the subsequent task execution process, it is indicated that when the client determines that the target task version of the target scheduled task is different from the current task version, the execution of the target scheduled task of the current task version is interrupted, and the target scheduled task of the target task version is executed. Through the iteration of different versions of the scheduled task, under the action of the interruption mechanism, the modification of the scheduled task during the execution process is realized, the flexibility of the scheduled task is improved, and the usability and scalability of task execution are improved.

[0275] The above is a schematic solution of another task execution device in this embodiment. It should be noted that the technical solution of this task execution device and the technical solution of the above task execution method belong to the same concept. For the details not described in detail in the technical solution of the task execution device, reference can be made to the description of the technical solution of the above task execution method.

[0276] Corresponding to the above method embodiments, this specification also provides embodiments of a timing operation and maintenance device. Figure 11 It shows a schematic structural diagram of a timing operation and maintenance device provided by an embodiment of this specification. As Figure 11 shown, this device is applied to the client and includes:

[0277] A receiving module 1102, configured to receive a task execution request for a timing operation and maintenance task sent by the front end, where the task execution request carries a target task identifier of the target timing operation and maintenance task;

[0278] A third lookup module 1104, configured to search for the target task version and target execution information of the target timing operation and maintenance task from the response information sent by the server according to the target task identifier, where the response information is obtained by the server modifying the modified timing operation and maintenance task, and the response information includes the task version and execution information obtained after modifying the modified timing operation and maintenance task;

[0279] A third execution module 1106, configured to interrupt the execution of the target timing operation and maintenance task of the current task version and execute the target timing operation and maintenance task of the target task version based on the target execution information when the target task version is different from the current task version of the target timing operation and maintenance task.

[0280] In the embodiments of the present specification, the task version of the timed operation and maintenance task is introduced. When it is necessary to execute the target timed operation and maintenance task, only the modified target task version and target execution information need to be searched in the response message. When the target task version is different from the current task version, the execution of the target timed operation and maintenance task of the current task version can be interrupted, and based on the modified target execution information, the target timed operation and maintenance task of the target task version can be re-executed. Through the iteration of different versions of the timed operation and maintenance task, under the action of the interruption mechanism, the modification of the timed operation and maintenance task during the execution process is realized, the flexibility of the timed operation and maintenance task is improved, and the usability and scalability of the operation and maintenance are improved.

[0281] The above is a schematic solution of a timed operation and maintenance device in this embodiment. It should be noted that the technical solution of this timed operation and maintenance device and the technical solution of the above-mentioned timed operation and maintenance method belong to the same concept. For the details not described in detail in the technical solution of the timed operation and maintenance device, reference can be made to the description of the technical solution of the above-mentioned timed operation and maintenance method.

[0282] Figure 12 The structural block diagram of a computing device provided by an embodiment of the present specification is shown. The components of the computing device 1200 include but are not limited to a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 through a bus 1230, and a database 1250 is used to store data.

[0283] The computing device 1200 also includes an access device 1240, which enables the computing device 1200 to communicate via one or more networks 1260. Examples of such networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, Worldwide Interoperability for Microwave Access (Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC).

[0284] In one embodiment of the present specification, the above components of the computing device 1200 and Figure 12 other components not shown may also be connected to each other, for example, via a bus. It should be understood that Figure 12 the block diagram of the computing device shown is for illustrative purposes only and is not a limitation on the scope of the present specification. Those skilled in the art may add or replace other components as needed.

[0285] The computing device 1200 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.) or other types of mobile devices, or a stationary computing device such as a desktop computer or a Personal Computer (PC). The computing device 1200 may also be a mobile or stationary server.

[0286] Wherein, the processor 1220 is used to execute the following computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the above task execution method or the timing operation and maintenance method are implemented.

[0287] The above is a schematic solution of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solutions of the above task execution method and timing operation and maintenance method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the descriptions of the technical solutions of the above task execution method or timing operation and maintenance method.

[0288] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above task execution method or timing operation and maintenance method.

[0289] The above is a schematic solution of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solutions of the above task execution method and timing operation and maintenance method belong to the same concept. For the details not described in detail in the technical solution of the storage medium, reference can be made to the descriptions of the technical solutions of the above task execution method or timing operation and maintenance method.

[0290] An embodiment of this specification also provides a computer program, which, when executed on a computer, causes the computer to execute the steps of the above task execution method or timing operation and maintenance method.

[0291] The above is a schematic solution of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solutions of the above task execution method and timing operation and maintenance method belong to the same concept. For the details not described in detail in the technical solution of the computer program, reference can be made to the descriptions of the technical solutions of the above task execution method or timing operation and maintenance method.

[0292] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.

[0293] The computer instructions include computer program code, which may be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, external hard drives, magnetic disks, optical discs, computer memories, read-only memories (ROMs), random access memories (RAMs), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0294] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of this specification are not limited by the described action sequence, because according to the embodiments of this specification, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.

[0295] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0296] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The alternative embodiments do not elaborate on all details and do not limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can well understand and utilize this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A task execution method, applied to a client, includes: Obtain a task execution request, where the task execution request carries a target task identifier of a target scheduled task; According to the target task identifier, find the target task version and target execution information of the target scheduled task from the response information sent by the server, where the response information is obtained by the server modifying a modified scheduled task, and the response information includes the task version and execution information obtained after modifying the modified scheduled task; In the case where the target task version is different from the current task version of the target scheduled task, interrupt the execution of the target scheduled task of the current task version, and execute the target scheduled task of the target task version based on the target execution information.

2. The method according to claim 1, before finding the target task version and target execution information of the target scheduled task from the response information sent by the server according to the target task identifier, further includes: Obtain the task identifier and modified execution information of the modified scheduled task; Generate and send a task modification request to the server based on the task identifier and the modified execution information, where the task modification request is used to instruct the server to modify the modified scheduled task to obtain response information; Receive the response information sent by the server.

3. The method according to claim 2, after generating and sending the task modification request to the server, further includes: Receive an error prompt message sent by the server, where the error prompt message is a prompt message sent by the server that fails to pass the verification of the modified execution information; Determine target error information based on the error prompt message, where the target error information is the execution information in the modified execution information that fails to pass the verification of the modified execution information; Modify the target error information in the modified execution information to obtain the modified modified execution information; Return to execute the step of generating and sending a task modification request to the server based on the task identifier and the modified execution information.

4. The method according to claim 1, the obtaining of the task execution request includes: Generate a task execution request according to the execution frequency corresponding to the target frequency parameter; Or, In response to a startup request of the client, generate a task execution request.

5. The method according to any one of claims 1-4, the executing the target scheduled task of the target task version based on the target execution information includes: Extract information on the execution content of the target scheduled task from the target execution information; Execute the target scheduled task of the target task version based on the information on the execution content.

6. The method according to claim 5, the extracting information on the execution content of the target scheduled task from the target execution information includes: Extract the target frequency parameter of the target task version from the target execution information; The executing the target scheduled task of the target task version based on the information on the execution content includes: Execute the target timing task of the target task version according to the execution frequency corresponding to the target frequency parameter.

7. The method according to claim 5, wherein extracting the information of the execution content of the target timing task from the target execution information includes: Extracting the target command information of the target task version from the target execution information; The executing the target timing task of the target task version based on the information of the execution content includes: Pulling the corresponding target command from the server according to the target command information; Executing the target timing task of the target task version through the target command.

8. The method according to claim 5, wherein extracting the information of the execution content of the target timing task from the target execution information includes: Extracting the target resource instance information of the target task version from the target execution information; The executing the target timing task of the target task version based on the information of the execution content includes: Executing the target timing task of the target task version on the resource instance corresponding to the target resource instance information.

9. A task execution method applied to a server, including: Obtaining a task modification request, wherein the task modification request carries a task identifier for modifying a timing task and modified execution information; Modifying the modified timing task according to the task identifier and the modified execution information to obtain a task version and execution information of the modified timing task; Generating response information based on the task version and the execution information; Sending the response information to the client, wherein the response information is used to instruct the client to interrupt the execution of the target timing task of the current task version and execute the target timing task of the target task version when it is determined that the target task version of the target timing task is different from the current task version.

10. The method according to claim 9, wherein modifying the modified timing task according to the task identifier and the modified execution information to obtain a task version and execution information of the modified timing task includes: When the modified execution information conforms to a preset format, modifying the modified timing task according to the task identifier and the modified execution information to obtain a task version and execution information of the modified timing task.

11. The method according to claim 9, further including: When the modified execution information does not conform to the preset format, sending an error prompt message to the client, wherein the error prompt message is used to instruct the client to modify the target error information in the modified execution information.

12. The method according to any one of claims 9-11, wherein modifying the modified timing task according to the task identifier and the modified execution information to obtain a task version and execution information of the modified timing task includes: Determining the execution information of the modified timing task of the current task version according to the task identifier; Modify the execution information of the modified scheduled task according to the modified execution information, where the execution information includes any one of a frequency parameter, command information, and resource instance information; Update the task version of the modified scheduled task.

13. A scheduled operation and maintenance method, applied to a client of an operation and maintenance tool, includes: Receive a task execution request for a scheduled operation and maintenance task sent by the front end, where the task execution request carries a target task identifier of the target scheduled operation and maintenance task; According to the target task identifier, find the target task version and target execution information of the target scheduled operation and maintenance task from the response information sent by the server, where the response information is obtained by the server modifying the modified scheduled operation and maintenance task, and the response information includes the task version and execution information obtained after modifying the modified scheduled operation and maintenance task; When the target task version is different from the current task version of the target scheduled operation and maintenance task, interrupt the execution of the target scheduled operation and maintenance task of the current task version, and execute the target scheduled operation and maintenance task of the target task version based on the target execution information.

14. A task execution system includes a server and a client; The server is used to receive a task modification request sent by the client, where The task modification request carries a task identifier of the modified scheduled task and modified execution information; according to the task identifier and the modified execution information, modify the modified scheduled task to obtain the task version and execution information of the modified scheduled task; generate response information based on the task version and the execution information; send the response information to the client; The client is configured to obtain a task execution request, where the task execution request carries a target task identifier of a target scheduled task; according to the target task identifier, find the target task version and target execution information of the target scheduled task from the response information sent by the server; when the target task version is different from the current task version of the target scheduled task, interrupt the execution of the target scheduled task of the current task version, and execute the target scheduled task of the target task version based on the target execution information.

15. A computing device includes: A memory and a processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 13 are implemented.

16. A computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.