CN113485814A - Batch task scheduling method and device - Google Patents

Batch task scheduling method and device Download PDF

Info

Publication number
CN113485814A
CN113485814A CN202110848414.XA CN202110848414A CN113485814A CN 113485814 A CN113485814 A CN 113485814A CN 202110848414 A CN202110848414 A CN 202110848414A CN 113485814 A CN113485814 A CN 113485814A
Authority
CN
China
Prior art keywords
task
batch
timing
tasks
scheduling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110848414.XA
Other languages
Chinese (zh)
Inventor
宋晓青
解亭
胡丽
武小康
孙瑜君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202110848414.XA priority Critical patent/CN113485814A/en
Publication of CN113485814A publication Critical patent/CN113485814A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method and a device for scheduling batch tasks, which relate to the field of distribution and comprise the following steps: writing a plurality of timing tasks and configuration information corresponding to each timing task into a configuration table; acquiring a configuration table at each preset time point, analyzing the configuration table to obtain batch timing tasks at each preset time point, a front-back relation of the batch timing tasks and an execution sequence of the batch timing tasks, and forming a task log table; calling an online program to execute the batch timing tasks at the preset time point according to the task log table; and receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point, and recording the execution result in the task log table. The configuration information of the timing tasks is written into the configuration table in advance, and the front-back relationship of the timing tasks is reflected in the task log table, so that the front-back relationship among the tasks can be controlled during batch timing task scheduling, and the possibility of task execution failure is reduced.

Description

Batch task scheduling method and device
Technical Field
The invention relates to the field of distributed technologies, in particular to a batch task scheduling method and device.
Background
In a bank peripheral system, a plurality of tasks needing timed starting and temporary starting exist, such as batch tasks of text timed sending, text timed loading and the like. At present, the Linux and unix systems are provided with their own crontabs to customize the timed tasks, realize the scheduled time to schedule the shell script, and complete the scheduling of the batch tasks through simple parameter configuration. However, this method cannot control the pre-and post-relationships among tasks, which may result in failure of task execution.
Disclosure of Invention
The embodiment of the invention provides a batch task scheduling method, which is used for controlling the front-back relationship among tasks and comprises the following steps:
writing a plurality of timing tasks and configuration information corresponding to each timing task into a configuration table;
acquiring a configuration table at each preset time point, analyzing the configuration table to obtain batch timing tasks at each preset time point, a front-back relation of the batch timing tasks and an execution sequence of the batch timing tasks, and forming a task log table;
calling an online program to execute the batch timing tasks at the preset time point according to the task log table;
and receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point, and recording the execution result in the task log table.
The embodiment of the invention also provides a batch task scheduling device, which is used for controlling the front-back relationship among tasks and comprises the following components:
the timing task information configuration module is used for writing a plurality of timing tasks and configuration information corresponding to each timing task into a configuration table;
the task log determining module is used for acquiring a configuration table at each preset time point, analyzing the configuration table, obtaining the batch timing tasks at each preset time point, the front-back relation of the batch timing tasks and the execution sequence of the batch timing tasks, and forming a task log table;
the online program calling module is used for calling the online program to execute the batch timing tasks of the preset time point according to the task log table;
and the task execution result determining module is used for receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point and recording the execution result in the task log table.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the batch task scheduling method is realized when the processor executes the computer program.
An embodiment of the present invention also provides a computer-readable storage medium, where a computer program for executing the batch task scheduling method is stored in the computer-readable storage medium.
In the embodiment of the invention, a plurality of timing tasks and configuration information corresponding to each timing task are written into a configuration table; acquiring a configuration table at each preset time point, analyzing the configuration table to obtain batch timing tasks at each preset time point, a front-back relation of the batch timing tasks and an execution sequence of the batch timing tasks, and forming a task log table; calling an online program to execute the batch timing tasks at the preset time point according to the task log table; and receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point, and recording the execution result in the task log table. The configuration information of the timing tasks is written into the configuration table in advance, and the front-back relationship of the timing tasks is reflected in the task log table, so that the front-back relationship among the tasks can be controlled during batch timing task scheduling, and the possibility of task execution failure is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a batch task scheduling method according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a batch task scheduling method according to an embodiment of the present invention.
FIG. 3 is a diagram illustrating a batch task scheduling method according to another embodiment of the present invention.
FIG. 4 is a flow chart of a timed task execution according to an embodiment of the present invention.
Fig. 5 is a flowchart of a temporary task execution according to an embodiment of the present invention.
FIG. 6 is a block diagram of an online lot scheduling tool according to an embodiment of the present invention.
FIG. 7 is a diagram illustrating an apparatus for scheduling batch tasks according to an embodiment of the present invention.
FIG. 8 is a diagram illustrating an apparatus for scheduling batch tasks according to an embodiment of the present invention.
FIG. 9 is a diagram of a batch task scheduling device according to another embodiment of the present invention
Fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a batch task scheduling method, configured to control a context relationship between tasks, as shown in fig. 1, where the method includes:
step 101: writing a plurality of timing tasks and configuration information corresponding to each timing task into a configuration table;
step 102: acquiring a configuration table at each preset time point, analyzing the configuration table to obtain batch timing tasks at each preset time point, a front-back relation of the batch timing tasks and an execution sequence of the batch timing tasks, and forming a task log table;
step 103: calling an online program to execute the batch timing tasks at the preset time point according to the task log table;
step 104: and receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point, and recording the execution result in the task log table.
As can be known from the flow shown in fig. 1, in the embodiment of the present invention, a plurality of timing tasks and configuration information corresponding to each timing task are written into a configuration table; acquiring a configuration table at each preset time point, analyzing the configuration table to obtain batch timing tasks at each preset time point, a front-back relation of the batch timing tasks and an execution sequence of the batch timing tasks, and forming a task log table; calling an online program to execute the batch timing tasks at the preset time point according to the task log table; and receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point, and recording the execution result in the task log table. The configuration information of the timing tasks is written into the configuration table in advance, and the front-back relationship of the timing tasks is reflected in the task log table, so that the front-back relationship among the tasks can be controlled during batch timing task scheduling, and the possibility of task execution failure is reduced.
In specific implementation, a plurality of timing tasks and configuration information corresponding to each timing task are written into a configuration table. The configuration information corresponding to the timing task comprises: the scheduling period of the timing task, the scheduling parameter of the timing task, the scheduling monitoring information of the timing task and the scheduling pre-and-post information of the timing task. Specifically, the scheduling period includes: every minute, hour, day, week, month. The scheduling parameters include: scheduling once every few minutes, a few points, a few days per week, a few numbers per month (i.e. a timed task may need to be executed many times), whether to wait for the last time point (whether to wait until the last execution is finished to execute the next time), whether to be a bin code or a shell; the scheduling monitoring information refers to information such as whether to send abnormal short messages or not; the scheduling context information is whether a context relationship exists with other timing tasks, for example, the task a must wait until the task B is executed before being executed.
And after writing the configuration table, acquiring the configuration table at each preset time point, analyzing the configuration table, and obtaining the batch timing tasks at each preset time point, the front-back relation of the batch timing tasks and the execution sequence of the batch timing tasks to form a task log table. In a specific embodiment, in order to improve the work efficiency, the whole point is generally set as a preset time point, that is, at 0 point, 1 point, … … point, and 23 point, the configuration table is obtained at regular time, and the configuration table is analyzed to obtain the batch timing tasks at each preset time point, the front-back relationship of the batch timing tasks, and the execution sequence of the batch timing tasks, so as to form a task log table.
And after a task log table is formed, calling an online program to execute the batch timing tasks at the preset time point according to the task log table. In a specific embodiment, a configuration C or shell program is invoked according to the type of record in the configuration table.
And receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point, and recording the execution result in the task log table. In an embodiment, the log table records an identifier field indicating whether to execute, for example, if the execution is successful, the identifier field is recorded as 1, and if the execution is failed, the identifier field is recorded as 0.
In a specific embodiment, in order to monitor a scheduling result of a timing task, as shown in fig. 2, the method for scheduling a batch task in the specific embodiment further includes, on the basis of fig. 1:
step 201: determining a timing task failed to execute according to the execution result of the batch timing tasks at each preset time point;
step 202: and summarizing the timing task information which fails to be executed within a preset time period to form an alarm prompt, and sending the alarm prompt to business personnel.
In a specific embodiment, the preset time period is generally set to one day or half a day, so that service personnel can conveniently find errors in time and process the errors in time. The form of sending to the service personnel is generally performed according to a mode configured in the scheduling monitoring information of the timing task, for example, the scheduling monitoring information is reminded by a short message or is reminded by a mail.
In a specific embodiment, there may be a case that the timing task needs to be advanced or delayed, for example, when the business scenario is that the core day-to-day time of a delivery day is advanced, the execution time points of many timing tasks need to be executed in advance. In order to implement the requirement of temporarily advancing or delaying the execution of the task, as shown in fig. 3, the method for scheduling the batch tasks in another embodiment further includes, on the basis of fig. 1:
step 301: writing the temporary tasks and the configuration information corresponding to each temporary task into a temporary task table;
step 302: and after a task log table is formed at each preset time point, acquiring a temporary task table, and updating the task log table according to the temporary task table to obtain an updated task log table.
Accordingly, step 103 is modified to: and calling the online program to execute the batch timing tasks at the preset time point according to the updated task log table.
Specifically, the configuration information corresponding to the temporary task includes: the original scheduled execution time of the provisional task and the actual execution time of the provisional task. And after the temporary task is executed, deleting the completed temporary task in the task log table.
A specific example is given below to illustrate how embodiments of the present invention perform batch task scheduling. The present example is a lightweight online batch scheduling tool based on a configuration table, which is developed by applying the batch task scheduling method in the embodiment of the present invention.
The tool adopts a configuration table form, configures respective dispatching rules for all tasks needing to be dispatched at regular time, arranges all task lists needing to be dispatched in the next hour according to the rules at each dispatching point, processes each time point one by one according to the list tasks, namely dispatches each task, records the dispatching condition of each task, can perform short message monitoring on the condition of dispatching failure, and ensures the accuracy of task dispatching. Besides the basic scheduling function, the front-back relation of the tasks can be set through a configuration table, and the functions of scheduling up the same task at different time points, advancing and delaying the temporary task and the like are realized.
The tool firstly needs to realize the most basic timing scheduling function, secondly can monitor the scheduling result in real time, can realize the front and back scheduling relation of different tasks according to the needs, and can schedule and wait in sequence for the same task at different time points so as to realize the advance or delay of the time points of the tasks.
The implementation scheme is a timing task execution flowchart of the specific example shown in fig. 4 and a temporary task execution flowchart of the specific example shown in fig. 5, and specifically includes:
s1: the tasks needing to be scheduled regularly are configured in a task table, each task needs to be configured with a scheduling period which comprises every minute, every hour, every day, every week and every month, and scheduling parameters which comprise numbers of every few minutes, several points, every week and every month, whether the last time point is waited, whether the last time point is a bin code or a shell, whether the last time point is early or late, whether the previous task is a preposed task, whether an abnormal short message is sent and the like. When a timing task is newly added, task configuration can be completed through simple data base laying.
Regarding the configuration period, as shown in table 1:
TABLE 1
Figure BDA0003181563230000051
Figure BDA0003181563230000061
S2: in order to improve the efficiency, the tool sets each integral point, and completely enumerates and inserts all tasks to be scheduled in the task log table according to the specific time points of all tasks to be scheduled in the next hour according to the task configuration table.
S3: the tool adopts a daemon process to ensure that the program is resident. And inquiring the records meeting the current time point in the task log table during each calling, processing all the records one by one, distinguishing the C program from the shell script, and calling up the C program or the shell script respectively to realize the basic function of the crontab. Meanwhile, after the program is called, the waiting calling result is obtained and returned, and the waiting calling result is recorded in the task log table, and the successful task and the failed task can be correspondingly processed subsequently.
S4: in S3, when the records to be scheduled at the current time point are processed one by one, if a certain task is configured with a pre-task, it is determined whether the pre-task is completed at the same time point, and the pre-task is scheduled only after the completion, so as to ensure the pre-and post-relation.
S5: in S3, when the records to be scheduled at the current time point are processed one by one, if a certain timing task is configured with a time point that needs to wait for the previous time point, it needs to be determined whether the scheduling at the previous time point of the task is completed, and the task is scheduled only after the completion, so as to ensure the logical relationship of the time points of the task.
S6: in order to realize the temporary early or late execution requirement of the task, a temporary table is set, data is laid as needed, and a plurality of fields are set in comparison with a conventional task configuration table, so that the original planned execution time and the actual execution time are distinguished, and whether the execution time is early or late is judged. After the tool finishes all the tasks to be processed within one hour, the record with the actual execution time in the temporary table in the time period range is inserted into the task log table to wait for starting, and the record with the original planned execution time in the temporary table in the time period range is deleted from the task log table.
As shown in fig. 6, an architecture diagram of the online batch scheduling tool is shown, the tool needs to be configured in a task configuration table in advance for a new scheduling requirement, and after configuration is successful, the tool is used as a resident process, and will scan a task record to be processed at each time point, then call up, and dynamically send an abnormal short message according to a scheduling result.
The specific embodiment can realize the timing scheduling of the program, and set the task scheduling rule in a configuration mode, thereby reducing the modification of the program when a new task is scheduled. In order to ensure that the program is continuously and normally called, the tool is set into a daemon process, the program is ensured to run all the time through the start-stop identifier, and the problem that other programs run due to the called program is avoided.
The specific embodiment can set the pre-and-post scheduling relationship among the tasks through configuration so as to judge whether the pre-task is finished without judging in each scheduled task; the tool can set the scheduling relation of different time points through configuration, allows the program to be scheduled strictly according to the time points, and also allows the program to be scheduled after the last time point, thereby being more beneficial to the application of different service logic scenes; the tool can set the advance or delay execution of the temporary task through the temporary table, and is suitable for the service according with the scene.
The specific example can be configured with an exception notification function, each task scheduling result is recorded and is sent to relevant support personnel in cooperation with a short message notification function, real-time monitoring of tool scheduling is guaranteed, and safe production and maintenance are easier to perform.
The implementation of the above specific application is only an example, and the rest of the embodiments are not described in detail.
Based on the same inventive concept, embodiments of the present invention further provide a batch task scheduling device, and because the principle of the problem solved by the batch task scheduling device is similar to that of the batch task scheduling method, the implementation of the batch task scheduling device may refer to the implementation of the batch task scheduling method, and the repeated parts are not repeated, and the specific structure is as shown in fig. 7:
a timing task information configuration module 701, configured to write a plurality of timing tasks and configuration information corresponding to each timing task into a configuration table;
a task log determining module 702, configured to obtain a configuration table at each preset time point, analyze the configuration table, obtain the batch timing tasks at each preset time point, a pre-post relationship of the batch timing tasks, and an execution sequence of the batch timing tasks, and form a task log table;
the online program calling module 703 is configured to call, according to the task log table, the online program to execute the batch timing task at the preset time point;
and the task execution result determining module 704 is configured to receive the returned invoking result, determine an execution result of the batch timing task at each preset time point, and record the execution result in the task log table.
In a specific embodiment, the configuration information corresponding to the timing task includes:
the scheduling period of the timing task, the scheduling parameter of the timing task, the scheduling monitoring information of the timing task and the scheduling pre-and-post information of the timing task.
In an embodiment, as shown in fig. 8, the batch task scheduling apparatus provided in the present invention further includes, on the basis of fig. 7:
task exception supervision module 801 for:
determining a timing task failed to execute according to the execution result of the batch timing tasks at each preset time point;
and summarizing the timing task information which fails to be executed within a preset time period to form an alarm prompt, and sending the alarm prompt to business personnel.
In another embodiment, as shown in fig. 9, the batch task scheduling apparatus further includes, on the basis of fig. 7:
a temporary task scheduling module 901 configured to:
writing the temporary tasks and the configuration information corresponding to each temporary task into a temporary task table;
and after a task log table is formed at each preset time point, acquiring a temporary task table, and updating the task log table according to the temporary task table to obtain an updated task log table.
Accordingly, the online program calling module 703 is specifically configured to:
and calling the online program to execute the batch timing tasks at the preset time point according to the updated task log table.
Specifically, the configuration information corresponding to the temporary task includes:
the original scheduled execution time of the provisional task and the actual execution time of the provisional task.
An embodiment of the present invention further provides a computer device, and fig. 10 is a schematic diagram of a computer device in an embodiment of the present invention, where the computer device is capable of implementing all steps in the batch task scheduling method in the foregoing embodiment, and the computer device specifically includes the following contents:
a processor (processor)1001, a memory (memory)1002, a communication Interface (Communications Interface)1003, and a communication bus 1004;
the processor 1001, the memory 1002 and the communication interface 1003 complete mutual communication through the communication bus 1004; the communication interface 1003 is used for realizing information transmission between related devices;
the processor 1001 is configured to call a computer program in the memory 1002, and when the processor executes the computer program, the batch task scheduling method in the above embodiment is implemented.
An embodiment of the present invention also provides a computer-readable storage medium, where a computer program for executing the batch task scheduling method is stored in the computer-readable storage medium.
In summary, the batch task scheduling method and apparatus provided by the embodiments of the present invention have the following advantages:
the configuration information of the timing tasks is written into the configuration table in advance, and the front-back relationship of the timing tasks is reflected in the task log table, so that the front-back relationship among the tasks can be controlled during batch timing task scheduling, and the possibility of task execution failure is reduced. Setting the early or late execution of the temporary task by writing the temporary task in the temporary table; the timing tasks with execution failure are determined, the timing task information with execution failure in a preset time period is collected to form an alarm prompt, the alarm prompt is sent to business personnel to configure an abnormal notification function, each task scheduling result is recorded and is sent to relevant support personnel in cooperation with a short message notification function, real-time monitoring of tool scheduling is guaranteed, and safe production and maintenance are facilitated.
Although the present invention provides method steps as described in the examples or flowcharts, more or fewer steps may be included based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, apparatus (system) or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "upper", "lower", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Unless expressly stated or limited otherwise, the terms "mounted," "connected," and "connected" are intended to be inclusive and mean, for example, that they may be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention is not limited to any single aspect, nor is it limited to any single embodiment, nor is it limited to any combination and/or permutation of these aspects and/or embodiments. Moreover, each aspect and/or embodiment of the present invention may be utilized alone or in combination with one or more other aspects and/or embodiments thereof.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.

Claims (14)

1. A method for scheduling a batch of tasks, comprising:
writing a plurality of timing tasks and configuration information corresponding to each timing task into a configuration table;
acquiring a configuration table at each preset time point, analyzing the configuration table to obtain batch timing tasks at each preset time point, a front-back relation of the batch timing tasks and an execution sequence of the batch timing tasks, and forming a task log table;
calling an online program to execute the batch timing tasks at the preset time point according to the task log table;
and receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point, and recording the execution result in the task log table.
2. The batch task scheduling method of claim 1, wherein the configuration information corresponding to the timing task comprises:
the scheduling period of the timing task, the scheduling parameter of the timing task, the scheduling monitoring information of the timing task and the scheduling pre-and-post information of the timing task.
3. The batch task scheduling method of claim 1, further comprising:
determining a timing task failed to execute according to the execution result of the batch timing tasks at each preset time point;
and summarizing the timing task information which fails to be executed within a preset time period to form an alarm prompt, and sending the alarm prompt to business personnel.
4. The batch task scheduling method of claim 1, further comprising:
writing the temporary tasks and the configuration information corresponding to each temporary task into a temporary task table;
and after a task log table is formed at each preset time point, acquiring a temporary task table, and updating the task log table according to the temporary task table to obtain an updated task log table.
5. The method for scheduling batch tasks according to claim 4, wherein the step of invoking the online program to execute the batch timing tasks at the preset time point according to the task log table comprises:
and calling the online program to execute the batch timing tasks at the preset time point according to the updated task log table.
6. The batch task scheduling method of claim 4, wherein the configuration information corresponding to the temporary task comprises:
the original scheduled execution time of the provisional task and the actual execution time of the provisional task.
7. A batch task scheduling apparatus, comprising:
the timing task information configuration module is used for writing a plurality of timing tasks and configuration information corresponding to each timing task into a configuration table;
the task log determining module is used for acquiring a configuration table at each preset time point, analyzing the configuration table, obtaining the batch timing tasks at each preset time point, the front-back relation of the batch timing tasks and the execution sequence of the batch timing tasks, and forming a task log table;
the online program calling module is used for calling the online program to execute the batch timing tasks of the preset time point according to the task log table;
and the task execution result determining module is used for receiving the returned starting result, determining the execution result of the batch timing tasks at each preset time point and recording the execution result in the task log table.
8. The batch task scheduling apparatus of claim 7, wherein the configuration information corresponding to the timing task comprises:
the scheduling period of the timing task, the scheduling parameter of the timing task, the scheduling monitoring information of the timing task and the scheduling pre-and-post information of the timing task.
9. The batch task scheduler of claim 7, further comprising: a task exception supervision module to:
determining a timing task failed to execute according to the execution result of the batch timing tasks at each preset time point;
and summarizing the timing task information which fails to be executed within a preset time period to form an alarm prompt, and sending the alarm prompt to business personnel.
10. The batch task scheduler of claim 7, further comprising: a temporary task scheduling module to:
writing the temporary tasks and the configuration information corresponding to each temporary task into a temporary task table;
and after a task log table is formed at each preset time point, acquiring a temporary task table, and updating the task log table according to the temporary task table to obtain an updated task log table.
11. The batch task scheduling device of claim 10, wherein the online program calling module is specifically configured to:
and calling the online program to execute the batch timing tasks at the preset time point according to the updated task log table.
12. The batch task scheduling apparatus of claim 10, wherein the configuration information corresponding to the temporary task includes:
the original scheduled execution time of the provisional task and the actual execution time of the provisional task.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 6 when executing the computer program.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 6.
CN202110848414.XA 2021-07-27 2021-07-27 Batch task scheduling method and device Pending CN113485814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110848414.XA CN113485814A (en) 2021-07-27 2021-07-27 Batch task scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110848414.XA CN113485814A (en) 2021-07-27 2021-07-27 Batch task scheduling method and device

Publications (1)

Publication Number Publication Date
CN113485814A true CN113485814A (en) 2021-10-08

Family

ID=77942746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110848414.XA Pending CN113485814A (en) 2021-07-27 2021-07-27 Batch task scheduling method and device

Country Status (1)

Country Link
CN (1) CN113485814A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114049754A (en) * 2021-12-06 2022-02-15 青岛鼎信通讯股份有限公司 Temporary collection task mechanism based on electric energy collection terminal of transformer substation
CN117252309A (en) * 2023-11-15 2023-12-19 青岛海信信息科技股份有限公司 Automatic timing execution method for office business process

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114049754A (en) * 2021-12-06 2022-02-15 青岛鼎信通讯股份有限公司 Temporary collection task mechanism based on electric energy collection terminal of transformer substation
CN117252309A (en) * 2023-11-15 2023-12-19 青岛海信信息科技股份有限公司 Automatic timing execution method for office business process
CN117252309B (en) * 2023-11-15 2024-02-13 青岛海信信息科技股份有限公司 Automatic timing execution method for office business process

Similar Documents

Publication Publication Date Title
US9990230B1 (en) Scheduling a notebook execution
US8301935B2 (en) Distributed batch runner
CN113485814A (en) Batch task scheduling method and device
CN109582466A (en) A kind of timed task executes method, distributed server cluster and electronic equipment
CN110611707B (en) Task scheduling method and device
CN105677465B (en) The data processing method and device of batch processing are run applied to bank
CN111125444A (en) Big data task scheduling management method, device, equipment and storage medium
CN110825535A (en) Job scheduling method and system
CN111160873A (en) Batch processing device and method based on distributed architecture
WO2009089746A1 (en) Method, device and system for realizing task in cluster environment
CN112181621A (en) Task scheduling system, method, equipment and storage medium
CN112131315A (en) Database synchronization method and device under multi-task parallel development
CN113220431A (en) Cross-cloud distributed data task scheduling method, device and storage medium
CN112199180A (en) Multitask scheduling method and device, electronic equipment and readable storage medium
CN112231073A (en) Distributed task scheduling method and device
CN114090198A (en) Distributed task scheduling method and device, electronic equipment and storage medium
CN113360282A (en) Task management method and device, electronic equipment and storage medium
CN113485817A (en) Task scheduling method and multi-task cooperative processing method based on multiple data sources
CN117076096A (en) Task flow execution method and device, computer readable medium and electronic equipment
CN115185787B (en) Method and device for processing transaction log
CN113746883A (en) Link tracking method and system
CN110750362A (en) Method and apparatus for analyzing biological information, and storage medium
CN115495527A (en) Data synchronization management system and method
CN115220887A (en) Processing method of scheduling information, task processing system, processor and electronic equipment
CN116303276A (en) Method for realizing file export by spring batch nested script

Legal Events

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