CN113419835A - Job scheduling method, device, equipment and medium - Google Patents

Job scheduling method, device, equipment and medium Download PDF

Info

Publication number
CN113419835A
CN113419835A CN202110754294.7A CN202110754294A CN113419835A CN 113419835 A CN113419835 A CN 113419835A CN 202110754294 A CN202110754294 A CN 202110754294A CN 113419835 A CN113419835 A CN 113419835A
Authority
CN
China
Prior art keywords
job
information
execution
scheduling
database
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
CN202110754294.7A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110754294.7A priority Critical patent/CN113419835A/en
Publication of CN113419835A publication Critical patent/CN113419835A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a job scheduling method, and belongs to the technical field of big data. The method comprises the following steps: generating a job scheduling table based on job information stored in a job database, wherein the job scheduling table sequences M jobs according to the sequence of the starting time of the M jobs, and records the execution conditions of the M jobs and the information of an actuator corresponding to each job; according to the job scheduling table, at the starting time of a first job in the M jobs, when the execution condition of the first job is met, the first job is scheduled to a first executor corresponding to the first job for execution; or according to the operation scheduling table, at the starting time of the first operation, when the execution condition of the first operation is not met, hoisting the first operation and giving an alarm. The present disclosure also provides a job scheduling apparatus, a device, a storage medium, and a program product.

Description

Job scheduling method, device, equipment and medium
Technical Field
The present disclosure relates to the field of big data technologies, and in particular, to a job scheduling method, apparatus, device, medium, and program product.
Background
Task scheduling is very important to business operations of an enterprise. Traditional task scheduling generally organizes batch job operation scheduling in a predefined static workflow form by relying on a third-party open platform operation automation system, and performs centralized storage and processing on data. However, dynamic adjustment is difficult due to the form of predefined static workflow, and the design of the predefined workflow is complex.
Disclosure of Invention
In view of the above, the present disclosure provides a job scheduling method, apparatus, device, medium, and program product that can implement dynamic scheduling.
According to a first aspect of the present disclosure, a job scheduling method is provided. The method comprises the following steps: generating an operation scheduling table based on operation information stored in an operation database, wherein the operation scheduling table sequences M operations according to the sequence of the starting time of the M operations, and records the execution conditions of the M operations and the information of an actuator corresponding to each operation, wherein M is an integer greater than 1; according to the job scheduling table, at the starting time of a first job in the M jobs, when the execution condition of the first job is met, the first job is scheduled to a first executor corresponding to the first job for execution; wherein the first job is any one of the M jobs; and according to the operation scheduling table, at the starting time of the first operation, when the execution condition of the first operation is not met, hoisting the first operation and giving an alarm.
According to the embodiment of the disclosure, the job database stores job information through N associated job tables, wherein the N associated job tables are associated with each other according to a preset structure, and N is an integer greater than or equal to 1. The generating a job schedule based on job information stored in a job database includes: presetting each field of the operation scheduling table; and for each job recorded in a job database, extracting field information of the job corresponding to the job scheduling table from N associated job tables stored in the job database and filling the field information into the job scheduling table.
According to the embodiment of the disclosure, the N associated job tables include a job list, wherein the job list summarizes basic information of all jobs needing to be scheduled; the generating a job schedule based on the job information stored in the job database further comprises: polling a job list in the job database; and when a second job with changed information exists in the job list, extracting field information corresponding to the job scheduling table of the second job from the N associated job tables, and updating the field information into the job scheduling table.
According to an embodiment of the present disclosure, the satisfying of the execution condition of the first job includes at least: an event triggering the submission mode of the first job occurs, wherein the submission mode comprises timed automatic submission or manual submission; when the first job has an upstream job with a dependency relationship, the upstream job execution is completed; and the state of the first actuator is available.
According to an embodiment of the present disclosure, the method further comprises: at the starting time of the first job, the state of the first actuator is determined by monitoring state information of S actuators stored in a registration center, wherein the first actuator is one of the S actuators, and S is an integer greater than 1.
According to an embodiment of the present disclosure, the method further comprises: when the first job has an upstream job with a dependency relationship, the execution state of the upstream job of the first job is determined by inquiring the execution result information of the job collected by the registry at the start time of the first job.
According to the embodiment of the disclosure, the method further includes when it is monitored that the registry collects the execution result information of the first job, correspondingly updating the execution state of the first job in the job database.
In a second aspect of the embodiments of the present disclosure, a job scheduling apparatus is provided. The device comprises a generating module, a scheduling module and an exception handling module. The generation module is used for generating an operation scheduling table based on operation information stored in an operation database, the operation scheduling table sequences M operations according to the sequence of the starting time of the M operations, and records the execution conditions of the M operations and the information of the executor corresponding to each operation, wherein M is an integer larger than 1. The scheduling module is used for scheduling a first job in the M jobs to a first actuator corresponding to the first job for execution at the starting time of the first job when the execution condition of the first job is met according to the job scheduling table; wherein the first job is any one of the M jobs. And the exception handling module is used for hoisting the first operation and giving an alarm when the execution condition of the first operation is not met at the starting moment of the first operation according to the operation scheduling table.
According to an embodiment of the present disclosure, the apparatus further includes a listening module. The monitoring module is configured to determine a state of the first executor by monitoring state information of S executors stored in a registry at a start time of the first job, where the first executor is one of the S executors, and S is an integer greater than 1.
According to the embodiment of the disclosure, the monitoring module is configured to determine the execution state of the upstream job of the first job by querying the execution result information of the job collected by the registry at the start time of the first job when the upstream job with the dependency relationship exists in the first job.
In a third aspect of the disclosed embodiments, an electronic device is provided. The electronic device includes one or more processors, and one or more memories. The one or more memories are for storing one or more programs. Wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described method.
In a fourth aspect of the present disclosure, there is also provided a computer-readable storage medium having stored thereon executable instructions, which when executed by a processor, cause the processor to perform the above-mentioned method.
In a fifth aspect of the disclosure, a computer program product is also provided, comprising a computer program which, when executed by a processor, implements the above method.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
fig. 1 schematically shows a scheduling framework to which a job scheduling method, apparatus, device, medium, and program product according to embodiments of the present disclosure are applied;
FIG. 2 schematically illustrates internal logic of a control center in a scheduling framework according to an embodiment of the disclosure;
FIG. 3 schematically illustrates internal logic of a registration center in a scheduling framework according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart of a job scheduling method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart for generating a job schedule in a job scheduling method according to an embodiment of the present disclosure;
FIG. 6 schematically shows a flowchart for generating a job schedule in a job scheduling method according to another embodiment of the present disclosure;
fig. 7 schematically shows a block diagram of the configuration of a job scheduling apparatus according to an embodiment of the present disclosure; and
fig. 8 schematically shows a block diagram of an electronic device adapted to implement a job scheduling method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In this document, it is to be understood that any number of elements in the specification and drawings is to be considered exemplary rather than limiting, and that any nomenclature (e.g., first, second) is used for distinction only, and not in any limiting sense.
The embodiment of the disclosure provides a job scheduling method, a job scheduling device, job scheduling equipment, job scheduling media and a job scheduling program. The job scheduling method can include the steps that based on job information stored in a job database, a job scheduling table is generated, the job scheduling table sequences M jobs according to the sequence of the starting time of the M jobs, and the execution conditions of the M jobs and the information of an actuator corresponding to each job are recorded, wherein M is an integer larger than 1; according to the job scheduling table, at the starting time of a first job in the M jobs, when the execution condition of the first job is met, the first job is scheduled to a first executor corresponding to the first job for execution; wherein the first job is any one of the M jobs; and according to the operation scheduling table, at the starting time of the first operation, when the execution condition of the first operation is not met, hoisting the first operation and giving an alarm.
According to the embodiment of the disclosure, the job scheduling table can be generated according to the job information stored in the job database, and then the job scheduling is performed according to the start time of the job in the job scheduling table, the execution condition met by the scheduling requirement and the executor, so that the dynamic scheduling adjustment of the job can be realized according to the information in the job database, and the complex design of the predefined job flow is avoided.
It should be noted that the job scheduling method and apparatus determined in the embodiments of the present disclosure may be used in the financial field, and may also be used in any field other than the financial field.
Fig. 1 schematically shows a scheduling framework 100 to which a job scheduling method, apparatus, device, medium, and program product according to embodiments of the present disclosure are applied. It should be noted that fig. 1 is only an example of a scheduling framework to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other frameworks, systems, environments or scenarios.
As shown in FIG. 1, the scheduling framework 100 may include a job database group (including job databases 101A and 101B), a control center 102, a registration center 103, an execution center 104, an operation and maintenance center 105, and executors 1-n.
Specifically, the job database group is used for storing job information, data loading information and alarm information. The job databases 101A and 101B in the job database group are in a master-slave relationship, wherein the job database 101B serves as a real-time backup database for the job database 101A.
The control center 102 can acquire jobs to be executed by reading and writing a job database group and register the jobs with the registration center 103. In performing job scheduling, the control center 102 can perform dynamic job scheduling by listening for information changes in the registration center 103 and polling job change information in the job database 101A. Control center 102 may include multiple instances of control centers, one of which is an elected primary control center and the other of which is a backup control center.
The registry 103 may use a Zookeeper service, and may include a plurality of Zookeeper nodes, which are respectively used to store configuration information of the control center 102, status information and machine information of the actuators 1 to n, and monitoring information and alarm information during job execution. The registration center 103 can also select a main control center from a plurality of control center examples, so as to realize high availability of the control center.
The execution center 104 may distribute the job to the corresponding executor to execute by listening to the information change of the registration center 103. The executors 1 to n may be, for example, various application programs, various servers, databases, or the like, and implement specific job execution operations.
The operation and maintenance center 105 may maintain the job database 101A by accessing job information in the job database 101A. In addition, the operation and maintenance center 105 may also display the operation status and the alarm information on the front-end page in real time, and provide a manual intervention interface to achieve the purpose of dynamically adjusting the operation. Furthermore, the operation and maintenance center 105 may also configure and view information stored in the registration center 103 through the front end, or may also actively monitor information (e.g., alarm information) of the registration center 103, and so on, to achieve the purpose of monitoring the operation state and dynamically adjusting the operation in real time.
The job scheduling method according to the embodiment of the present disclosure may be implemented by the scheduling framework 100, and may be specifically executed by the control center 102. In the scheduling framework 100, the control center 102 can perform dynamic scheduling of jobs through interaction with the job database group and the registration center 103. For example, the control center 102 may generate a job schedule based on job information stored in the job database 101A and perform job scheduling based on the job schedule. During scheduling, the control center 102 may monitor information of the registration center 103 to determine whether the execution condition of the job is satisfied (e.g., whether an actuator is available, whether an upstream job is completed, whether a manual trigger signal is provided from the operation and maintenance center 105, etc.), and accordingly determine whether to perform normal scheduling of the job or to suspend the job.
In the scheduling framework 100, the executor allocation operation may be implemented by the execution center 104 after the control center 102 initiates normally scheduled job scheduling information. Specifically, the registration center 103 may obtain the actuator scheduling information sent by the control center 102, and send the scheduling information to the execution center 104. The execution center 104 may then assign the job to the corresponding actuator for execution according to the monitored scheduling information. Meanwhile, the execution center 104 may return execution result information of the executor to the registration center 103. The control center 102 can also update the execution status of the job in the job database 101A in real time by listening to the execution result information in the registration center 103.
The scheduling framework 100 may track the job through the job database 101A, and record the job execution process and the loading log information, the progress information, and/or the alarm information of the job. The scheduling framework 100 can access information of the job database 101A, implement a batch loading process of jobs in the job database 101A, and perform dynamic scheduling for different business topics, different databases, and different partitions, so that the whole batch job has controllable overall execution resources, controllable efficiency, safety, and business, and is controllable in horizontal (library, table) and vertical (business date and loading date).
Fig. 2 schematically illustrates the internal logic of the control center 102 in a dispatch framework in accordance with an embodiment of the present disclosure.
As shown in fig. 2, the control center 102 may generate a job schedule table based on job information in the job database 101A, and may update the job schedule table by polling information changes of the job list in the job database 101A (S201).
The control center 102 may also change the job status in the job database 101A by listening to the execution result information collected by the registration center 103 from the execution center 104, and perform processing according to a predefined processing manner (S202). For example, if a job execution succeeds, a downstream dependent job may be initiated. If the job fails to be executed, the amc alarm system of the operation and maintenance center 105 may be started through the registration center 103, or an email may be sent to the front-end user of the operation and maintenance center 105.
The control center 102 may also monitor the status of the actuators stored in the registration center 103, sense whether the actuators are available, and determine whether to lift related operations and alarm (S203).
According to an embodiment of the present disclosure, a plurality of control centers 102 may be provided, and each control center 102 may determine whether to execute the current job scheduling task by itself by listening to the result of the registration center 103 electing the master control center based on the zookeeper service (S204).
FIG. 3 schematically illustrates the internal logic of registration center 103 in a scheduling framework according to an embodiment of the disclosure.
As shown in fig. 3, the registration center 103 may store information of the control center 102, and may use a Zookeeper service to select a master control center from three control center nodes (control centers 1, 2, and 3 in the figure) of the control center 102, so as to achieve high availability of job scheduling of the control center.
Registry 103 may also store information about fulfillment center 104, interacting with fulfillment center 104. For example, information such as state information, IP addresses, names of instances executed, and the like of S actuators managed by the execution center 104 is acquired. In the process of scheduling jobs, the registration center 103 may issue scheduling information to the execution center 104, and the execution center 104 may assign jobs to specific actuators according to the scheduling information. Meanwhile, the registration center 103 may collect the execution result information of the job by each of the executors fed back by the execution center 104.
The registration center 103 may also collect and store execution status information (e.g., start, pause, or stop) of job execution, and execution result information (e.g., information of execution success or failure) of the job through interaction with the execution center 104 and/or the job database 101A.
The job scheduling method of the disclosed embodiment will be described in detail through fig. 4 to 6 based on the call framework 100 described in fig. 1 to 3.
FIG. 4 schematically shows a flowchart of a job scheduling method according to an embodiment of the present disclosure.
As shown in fig. 4, the job scheduling method according to this embodiment may include operations S410 to S450. The job scheduling method may be performed by the control center 102.
In operation S410, a job scheduling table is generated based on the job information stored in the job database 101A, the job scheduling table sequences M jobs according to the sequence of the start times of the M jobs, and records the execution conditions of the M jobs and the information of the executor corresponding to each job, where M is an integer greater than 1.
In operation S420, it is determined whether the current time reaches the start time of any one of the M jobs. If not, returning to continue waiting. If yes, operation S430 is performed.
In operation S430, it is determined whether the current environment satisfies the execution condition of a certain job (e.g., a first job) when the start time of the job is reached.
According to one embodiment of the present disclosure, whether the execution condition of the first job is satisfied can be determined from the manner of submission (automatic or manual) of the first job, the execution state of an upstream job having a dependency relationship when the first job exists, the state of a first executor executing the first job, and the like. In one embodiment, satisfying the execution condition of the first job includes at least: an event triggering a manner of submission of the first job occurs, upstream job execution is completed when there is an upstream job having a dependency relationship for the first job, and a state of the first executor is available.
Specifically, if the submission mode of the first job is timed automatic submission, the event triggering the submission mode of the first job is the event triggering as long as the current time reaches the starting time of the first job; or, if the submission mode of the first job is manual submission, the trigger event is not meant to occur until a manual trigger signal of the user is received. For example, the operation and maintenance personnel manually submit the job at the front-end interface of the operation and maintenance center 105, and the information of the manually submitted job is sent to the registration center 103 and then monitored by the control center 102, so that the control center 102 can determine that the manually triggered event occurs.
When there is an upstream job having a dependency relationship in the first job, it may be determined whether the execution status of the upstream job of the first job is execution completion by referring to the execution result information of the job collected by the registry 103 at the start time of the first job.
For the state of the first actuator, the state of the first actuator can be determined by monitoring the state information of S actuators stored in the registry 103.
Next, when it is determined in operation S430 that the execution condition of the first job is satisfied, operation S440 may be performed to schedule the first job to be executed at the first executor corresponding to the first job. Then, when the control center 102 listens to the execution result information (success or failure information as illustrated in fig. 3) of the first job collected by the registration center 103, the execution state of the first job in the job database 101A may be correspondingly updated.
Alternatively, when it is judged in operation S430 that the execution condition of the first job is not satisfied, operation S450 may be performed to hoist the first job and alarm. For example, after the control center 102 has hoisted the first job, an alarm signal is sent to the registration center 103. The operation and maintenance center 105 may trigger a front-end alarm by monitoring or receiving an alarm signal in the registration center 103.
Fig. 5 schematically shows a flowchart of operation S410 in the job scheduling method according to an embodiment of the present disclosure to generate a job schedule.
As shown in fig. 5, the process of generating the job schedule table in operation S410 according to the embodiment may include operations S501 to S502.
In operation S501, various fields of the job schedule table are set in advance, and for example, may include at least fields of a job name, a start time, a job dependency type, a dependent upstream job, a submission manner, executor information, and the like.
In operation S502, for each job recorded in the job database 101A, field information corresponding to the job schedule of the job is extracted from N associated job tables stored in the job database 101A and filled in the job schedule, wherein the N associated job tables are associated with each other according to a predetermined structure. The jobs in the job database 101A may be loaded to the control center in batch, processed in batch, and sorted according to the sequence of the start time after the information of all jobs is filled in the job scheduling table, so as to generate the job scheduling table.
According to an embodiment of the present disclosure, the N associated Job tables in the Job database 101A may include a Batch Job execution grouping table (Batch Set), a Batch Job list (Batch _ Def), a Job Detail table (Job _ Detail, Batch instance control table (Job _ Ins), and a Batch Job sending monitoring alarm table (AMC _ Ext), each table being, for example, table 1 to table 5 below.
The Batch job execution group table (Batch _ Set) shown in table 1 contains application topic information.
Table 1: batch _ Set Batch job execution grouping management table
version Version number
sn_id Line number
sub_id Topic id
sub_name Subject abbreviation
app Application abbreviation
Batch job list (Batch _ Def) shown in table 2: including batch information in the topic. When the batch job list in table 2 summarizes the batch information in all topics in the job database a, all the batch information in the entire job database 101A may be covered.
Table 2: batch _ Def Batch job List
sn_id Line number
sub_id Topic id
batch_id Batch id
batch_name Name in batches
status Bulk state
submit_type Batch submission mode
description Bulk function description
update_time Bulk update time
set_id Actuator id
The Job details table (Job _ detail) shown in table 3 contains details of each Job in the batch and dependency information.
Table 3: job _ detail sheet
sn_id Line number
sub_id Topic id
batch_id Batch id
job_id Job id
job_name Job name
submit_type Job submission method
depend_type Job dependent type
depend_id Dependent upstream
type Type of operation
The batch instance control table (Job _ Ins) shown in Table 4 contains Job status information for a particular run.
Table 4: job _ Ins batch instance control Table
sn_id Self-increment id
sub_id Topic id
batch_id Batch id
ins_id Job instance id
status Operating state
submit_type Submission mode
batch_date Date of work
schedule_time Execution Interval
report_time Reporting time
start_time Starting time
end_time End time
The bulk job send monitor alarm table (AMC _ Ext) shown in Table 5 contains configuration information for the AMC alarm signal in the job.
Table 5: AMC _ Ext bulk job sending AMC configuration table
sn_id Line number
app Application abbreviation
sub_id Topic id
batch_id Batch id
job_id Job id
amc_code amc module name
amc_flag Time of transmission
The Batch Job execution group table (Batch _ Set), the Batch Job list (Batch _ Def), the Job Detail table (Job _ Detail), the Batch instance control table (Job _ Ins), and the Batch Job transmission monitoring alarm table (AMC _ Ext) in tables 1 to 5 are associated with each other, and information of different dimensions of the Batch Job is recorded.
Fig. 6 schematically shows a flowchart of generating a job schedule in operation S410 in a job scheduling method according to another embodiment of the present disclosure.
As shown in fig. 6, the process of generating the job schedule table in operation S410 according to the embodiment may include operations S601 to S602.
In operation S601, a job list in the job database 101A is polled. This job list may be, for example, a batch job list shown in table 2 described above in which basic information of all batch jobs in the job database 101A is summarized.
In operation S602, when there is a second job whose information is changed in the job list, field information corresponding to the job schedule in the second job is extracted from the N associated job tables and updated into the job schedule. For example, in one embodiment, whether there is a batch job for which information is changed may be determined based on the batch update time in Table 2. Alternatively, in other embodiments, the determination of whether there is a batch job with information changed may be based on a change in an entry (e.g., an actuator id) in Table 2. The information change may include addition, deletion, adjustment of an executor, change of a submission mode, change of a state, and the like of a job.
According to the embodiment of the disclosure, the dynamic adjustment of the job scheduling table can be realized in a polling mode. Therefore, when a certain job changes, the information in the job scheduling table can be dynamically updated, so that dynamic scheduling is realized, the job can be flexibly regulated, and the problems of large quantity of predefined rule design and large maintenance and modification workload in the related technology are effectively solved.
Based on the job scheduling method, the disclosure also provides a job scheduling device. The apparatus will be described in detail below with reference to fig. 7.
Fig. 7 schematically shows a block diagram of a job scheduling apparatus 700 according to an embodiment of the present disclosure.
As shown in fig. 7, the job scheduling apparatus 700 according to an embodiment of the present disclosure includes a generation module 710, a scheduling module 720, and an exception handling module 730. According to another embodiment of the present disclosure, the apparatus 700 may further include a listening module 740. The apparatus 700 may be disposed in the control center 102, and is used to implement the job scheduling method described with reference to fig. 4 to 6.
The generating module 710 is configured to generate a job scheduling table based on job information stored in the job database 101A, where the job scheduling table sequences M jobs according to a sequence of start times of the M jobs, and records execution conditions of the M jobs and information of an actuator corresponding to each job, where M is an integer greater than 1. In an embodiment, the generating module 710 may be configured to perform the operation S410 described above, which is not described herein again.
The scheduling module 720 is configured to schedule, at a start time of a first job in the M jobs according to the job scheduling table, the first job to a first executor corresponding to the first job for execution when an execution condition of the first job is satisfied; wherein the first job is any one of the M jobs. In an embodiment, the generating module 720 may be configured to perform the operation S440 described above, which is not described herein again.
The exception handling module 730 is configured to, at the start time of the first job, suspend the first job and alarm when the execution condition of the first job is not satisfied according to the job scheduling table. In an embodiment, the generating module 720 may be configured to perform the operation S450 described above, which is not described herein again.
The monitoring module 740 is configured to determine, at the start time of the first job, a state of a first executor by monitoring state information of S executors stored in the registry 103, where the first executor is one of the S executors, and S is an integer greater than 1. Alternatively, the monitoring module 740 may be configured to determine the execution status of the upstream job of the first job by querying the execution result information of the job collected by the registry 103 at the start time of the first job when the upstream job having the dependency relationship exists for the first job.
According to an embodiment of the present disclosure, any plurality of the generating module 710, the scheduling module 720, the exception handling module 730, and the listening module 740 may be combined into one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the generating module 710, the scheduling module 720, the exception handling module 730, and the listening module 740 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the generating module 710, the scheduling module 720, the exception handling module 730, and the listening module 740 may be at least partially implemented as a computer program module that, when executed, may perform a corresponding function.
Fig. 8 schematically shows a block diagram of an electronic device 800 adapted to implement a job scheduling method according to an embodiment of the present disclosure.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., Application Specific Integrated Circuit (ASIC)), among others. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM803, various programs and data necessary for the operation of the electronic apparatus 800 are stored. The processor 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or RAM 803. Note that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 800 may also include input/output (I/O) interface 805, input/output (I/O) interface 805 also connected to bus 804, according to an embodiment of the present disclosure. Electronic device 800 may also include one or more of the following components connected to I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 802 and/or RAM803 described above and/or one or more memories other than the ROM 802 and RAM 803.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the job scheduling method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 801. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via communication section 809, and/or installed from removable media 811. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A job scheduling method includes:
generating an operation scheduling table based on operation information stored in an operation database, wherein the operation scheduling table sequences M operations according to the sequence of the starting time of the M operations, and records the execution conditions of the M operations and the information of an actuator corresponding to each operation, wherein M is an integer greater than 1;
according to the job scheduling table, at the starting time of a first job in the M jobs, when the execution condition of the first job is met, the first job is scheduled to a first executor corresponding to the first job for execution; wherein the first job is any one of the M jobs; and
and according to the operation scheduling table, at the starting time of the first operation, when the execution condition of the first operation is not met, hoisting the first operation and giving an alarm.
2. The method according to claim 1, wherein the job database stores the job information by N associated job tables, wherein the N associated job tables are associated with each other according to a predetermined structure, and N is an integer greater than or equal to 1; the generating a job schedule based on job information stored in a job database includes:
presetting each field of the operation scheduling table; and
for each job recorded in the job database, extracting field information corresponding to the job schedule of the job from N associated job tables stored in the job database and filling the field information into the job schedule.
3. The method of claim 2, wherein the N associated job tables include a job list, wherein the job list summarizes basic information of all jobs that need to be scheduled; the generating a job schedule based on the job information stored in the job database further comprises:
polling a job list in the job database; and
and when a second job with changed information exists in the job list, extracting field information corresponding to the job scheduling table of the second job from the N associated job tables, and updating the field information into the job scheduling table.
4. The method of claim 1, wherein the satisfying the execution condition of the first job comprises at least:
an event triggering the submission mode of the first job occurs, wherein the submission mode comprises timed automatic submission or manual submission;
when the first job has an upstream job with a dependency relationship, the upstream job execution is completed; and
the state of the first actuator is available.
5. The method of claim 4, wherein the method further comprises:
at the starting time of the first job, the state of the first actuator is determined by monitoring state information of S actuators stored in a registration center, wherein the first actuator is one of the S actuators, and S is an integer greater than 1.
6. The method of claim 4, wherein the method further comprises:
when the first job has an upstream job with a dependency relationship, the execution state of the upstream job of the first job is determined by inquiring the execution result information of the job collected by the registry at the start time of the first job.
7. The method of claim 6, wherein the method further comprises:
and when monitoring that the registry collects the execution result information of the first job, correspondingly updating the execution state of the first job in the job database.
8. A job scheduling apparatus comprising:
the generating module is used for generating an operation scheduling table based on operation information stored in an operation database, sequencing the M operations according to the sequence of the starting time of the M operations in the operation scheduling table, and recording the execution conditions of the M operations and the information of an actuator corresponding to each operation, wherein M is an integer greater than 1;
the scheduling module is used for scheduling a first job in the M jobs to a first executor corresponding to the first job for execution at the starting time of the first job when the execution condition of the first job is met according to the job scheduling table; wherein the first job is any one of the M jobs; and
and the exception handling module is used for hoisting the first operation and giving an alarm when the execution condition of the first operation is not met at the starting moment of the first operation according to the operation scheduling table.
9. An electronic device, comprising:
one or more processors;
one or more memories for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 7.
CN202110754294.7A 2021-07-02 2021-07-02 Job scheduling method, device, equipment and medium Pending CN113419835A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110754294.7A CN113419835A (en) 2021-07-02 2021-07-02 Job scheduling method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110754294.7A CN113419835A (en) 2021-07-02 2021-07-02 Job scheduling method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113419835A true CN113419835A (en) 2021-09-21

Family

ID=77721384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110754294.7A Pending CN113419835A (en) 2021-07-02 2021-07-02 Job scheduling method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113419835A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116954868A (en) * 2023-09-19 2023-10-27 云粒智慧科技有限公司 Scheduling engine system, task scheduling method thereof and data request method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528853A (en) * 2016-11-28 2017-03-22 中国工商银行股份有限公司 Data interaction management device and cross-database data interaction processing device and method
CN110795479A (en) * 2019-10-08 2020-02-14 中国建设银行股份有限公司 Method and device for distributed ETL scheduling based on data
CN111930487A (en) * 2020-08-28 2020-11-13 北京百度网讯科技有限公司 Job flow scheduling method and device, electronic equipment and storage medium
CN113032125A (en) * 2021-04-02 2021-06-25 京东数字科技控股股份有限公司 Job scheduling method, device, computer system and computer-readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528853A (en) * 2016-11-28 2017-03-22 中国工商银行股份有限公司 Data interaction management device and cross-database data interaction processing device and method
CN110795479A (en) * 2019-10-08 2020-02-14 中国建设银行股份有限公司 Method and device for distributed ETL scheduling based on data
CN111930487A (en) * 2020-08-28 2020-11-13 北京百度网讯科技有限公司 Job flow scheduling method and device, electronic equipment and storage medium
CN113032125A (en) * 2021-04-02 2021-06-25 京东数字科技控股股份有限公司 Job scheduling method, device, computer system and computer-readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116954868A (en) * 2023-09-19 2023-10-27 云粒智慧科技有限公司 Scheduling engine system, task scheduling method thereof and data request method

Similar Documents

Publication Publication Date Title
US11334465B2 (en) Long running workflows for robotic process automation
US7689989B2 (en) Thread monitoring using shared memory
US7523196B2 (en) Session monitoring using shared memory
US8826286B2 (en) Monitoring performance of workload scheduling systems based on plurality of test jobs
US7898679B2 (en) Method and system for scheduling jobs in a computer system
EP1679602B1 (en) Shared memory based monitoring for application servers
CN107016480B (en) Task scheduling method, device and system
US20230161647A1 (en) Extending the kubernetes api in-process
US20210146537A1 (en) Scheduling robots for robotic process automation
CN109871384B (en) Method, system, equipment and storage medium for container migration based on PaaS platform
US20120131392A1 (en) Systems and methods providing an exception buffer to facilitate processing of event handler errors
US20170262315A1 (en) Multilayered resource scheduling
CN113032125A (en) Job scheduling method, device, computer system and computer-readable storage medium
CN112130976A (en) REST-based multi-engine big data task management method
CN114817050A (en) Task execution method and device, electronic equipment and computer readable storage medium
CN113419835A (en) Job scheduling method, device, equipment and medium
CN113157569B (en) Automated testing method, apparatus, computer device and storage medium
CN114168297A (en) Method, device, equipment and medium for scheduling collection tasks
CN112948096A (en) Batch scheduling method, device and equipment
CN113760491A (en) Task scheduling system, method, equipment and storage medium
CN115373886A (en) Service group container shutdown method, device, computer equipment and storage medium
CN113052571A (en) Method and device for processing workflow critical path
US20180089344A1 (en) Adaptive methodology framework system and method thereof
US10977210B2 (en) Methods for implementing an administration and testing tool
US20240202023A1 (en) Report reexecution framework

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