WO2019223173A1 - 高频任务调度方法、系统、计算机设备和存储介质 - Google Patents

高频任务调度方法、系统、计算机设备和存储介质 Download PDF

Info

Publication number
WO2019223173A1
WO2019223173A1 PCT/CN2018/104362 CN2018104362W WO2019223173A1 WO 2019223173 A1 WO2019223173 A1 WO 2019223173A1 CN 2018104362 W CN2018104362 W CN 2018104362W WO 2019223173 A1 WO2019223173 A1 WO 2019223173A1
Authority
WO
WIPO (PCT)
Prior art keywords
scheduling
task
database
information
scheduled
Prior art date
Application number
PCT/CN2018/104362
Other languages
English (en)
French (fr)
Inventor
刘斌
费晓晖
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019223173A1 publication Critical patent/WO2019223173A1/zh

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

Definitions

  • the present application relates to the field of scheduling technologies, and in particular, to a task scheduling method, system, computer device, and storage medium.
  • Task scheduling refers to the automatic execution of tasks based on a given point in time, a given time interval, or a given number of executions.
  • there are often planned tasks that is, to do something at a certain point in time, and the core is to focus on the time, that is, at a specific point in time, the system performs a specified operation
  • task scheduling Involving multi-threaded concurrency, maintenance of the thread pool, analysis of run-time rules, protection of the running scene to recover, etc.
  • Existing task scheduling methods mainly include task scheduling under the MapReduce framework, task scheduling based on particle swarm algorithm, task scheduling in the cloud computing environment, virtual machine integration, and scheduled task scheduling service systems.
  • these task scheduling methods can implement task scheduling
  • these task scheduling platforms can only focus on time, can only set task scheduling at the hour level, and cannot support high-frequency task scheduling at the minute or second level.
  • the number of settings is limited, the waiting time for task execution is long, scheduling tasks cannot be performed in a timely manner, and tasks at the minute or second level cannot be delivered, which also limits the application scenarios of the scheduling platform.
  • a high-frequency task scheduling method includes:
  • the scheduling server invokes a scheduled task framework preset in a database to perform scheduled task scheduling.
  • the scheduled task framework presets scheduled tasks.
  • the scheduled tasks are configured with task content, scheduling rules, and scheduling information.
  • the scheduling information is stored in the scheduling task.
  • the scheduling server configures a scheduler interface, and uses the scheduler interface to modify the scheduling rules and scheduling information of any scheduled task in the scheduled task framework.
  • the scheduler interface is encapsulated as an API interface and placed in the django project;
  • the scheduling server is configured with a monitor, and the monitor performs a SQL query on the database storing the scheduling information according to a predetermined monitoring method, and obtains the monitoring result and then notifies.
  • a high-frequency task scheduling system includes:
  • the timing task configuration unit is configured to schedule a scheduling server to call a timing task framework preset in a database to perform timing task scheduling.
  • the timing task framework presets timing tasks, and the timing tasks are configured with task content, scheduling rules, and scheduling information. Scheduling information is stored in the database;
  • the interface configuration unit is configured to configure a scheduler interface for the scheduling server, modify the scheduling rules and scheduling information of any scheduled task in the scheduled task framework through the scheduler interface, and the scheduler interface is encapsulated as an API interface and placed in the django project;
  • the monitoring unit is configured to configure a monitor for the scheduling server, and the monitor performs a SQL query on the database storing the scheduling information according to a predetermined monitoring mode, and notifies after obtaining the monitoring result.
  • a computer device includes a database and a processor.
  • the database stores computer-readable instructions.
  • the processor causes the processor to perform the following steps:
  • the scheduling server invokes a scheduled task framework preset in a database to perform scheduled task scheduling.
  • the scheduled task framework presets scheduled tasks.
  • the scheduled tasks are configured with task content, scheduling rules, and scheduling information.
  • the scheduling information is stored in the scheduling task.
  • the scheduling server configures a scheduler interface, and uses the scheduler interface to modify the scheduling rules and scheduling information of any scheduled task in the scheduled task framework.
  • the scheduler interface is encapsulated as an API interface and placed in the django project;
  • the scheduling server is configured with a monitor, and the monitor performs a SQL query on the database storing the scheduling information according to a predetermined monitoring method, and obtains the monitoring result and then notifies.
  • a storage medium storing computer-readable instructions.
  • the one or more processors execute the following steps:
  • the scheduling server invokes a scheduled task framework preset in a database to perform scheduled task scheduling.
  • the scheduled task framework presets scheduled tasks.
  • the scheduled tasks are configured with task content, scheduling rules, and scheduling information.
  • the scheduling information is stored in the scheduling task.
  • the scheduling server configures a scheduler interface, and uses the scheduler interface to modify the scheduling rules and scheduling information of any scheduled task in the scheduled task framework.
  • the scheduler interface is encapsulated as an API interface and placed in the django project;
  • the scheduling server is configured with a monitor, and the monitor performs a SQL query on the database storing the scheduling information according to a predetermined monitoring method, and obtains the monitoring result and then notifies.
  • the above-mentioned high-frequency task scheduling method, device, computer equipment, and storage medium include a scheduling server calling a scheduled task framework preset in a database to perform scheduled task scheduling, the scheduled task framework presets scheduled tasks, and scheduled tasks are configured with task content, Scheduling rules and scheduling information. Scheduling information is stored in the database.
  • the scheduling server configures a scheduler interface to modify the scheduling rules and scheduling information of any scheduled task in the scheduled task framework through the scheduler interface.
  • the scheduler interface is encapsulated as an API interface. Placed in the django project; the scheduling server is configured with a monitor, and the monitor performs a SQL query on the database storing the scheduling information according to a predetermined monitoring method, and notifies after obtaining the monitoring result.
  • timing task framework as a new scheduling engine, starts task scheduling according to the timing task configuration, supports minute and even second-level high-frequency task scheduling; writes scheduling information into the database to realize the scheduling information persistence; through API
  • the interface implements dynamic modification of the task scheduling frequency to support the task scheduling of timing, time interval, etc .; the introduction of a monitor to achieve real-time monitoring of the scheduling process, and timely discovery and modification of problems in task scheduling.
  • FIG. 1 is a flowchart of a high-frequency task scheduling method according to an embodiment of the present application
  • FIG. 2 is a flowchart of adding a timing task according to an embodiment of the present application
  • FIG. 3 is a structural diagram of a high-frequency task scheduling system in an embodiment of the present application.
  • FIG. 1 is a flowchart of a high-frequency task scheduling method according to an embodiment of the present application. As shown in FIG. 1, a high-frequency task scheduling method includes the following steps:
  • step S1 the scheduling server calls a scheduled task framework preset in the database to perform scheduled task scheduling.
  • the scheduled task framework presets scheduled tasks.
  • the scheduled tasks are configured with task content, scheduling rules, and scheduling information.
  • the scheduling information is stored in the database.
  • the scheduling server in this embodiment may select a Linux server.
  • the Linux server is a network server using the Linux system for business processing applications, such as network and system management, database management, and Web services. It is a server with high performance and open source.
  • the Linux server has excellent system stability and security. Because it uses a multi-user operating system, it has good flexibility and scalability. It can accommodate resources well regardless of the processor or machine architecture.
  • the software on the Linux server is free, so the Linux server can save costs in application development. Most user services can be developed more freely with Linux systems.
  • a new scheduling engine is introduced in the Linux server, that is, a scheduled task framework for scheduled task scheduling is preset in the Linux server.
  • the Linux server is preset, you can automatically install the python program containing the scheduled task framework and automatically install the scheduled task framework by calling the configure tool.
  • timer task framework function several timer tasks can be added on the Linux server as needed, and each timer task can be configured with its corresponding task content, scheduling rules, and scheduling information.
  • the task content is the task execution code
  • the scheduling rule is the task trigger mode
  • the scheduling information is the scheduling content after the task is triggered.
  • the Linux server starts the scheduled task framework, and each scheduled task executes the corresponding scheduling information according to the task content according to its scheduling rules.
  • the scheduled task framework can be installed by modifying the operating system environment variables and installing the scheduled task framework to the selected scheduling server.
  • the default storage of the timing task framework is simply to save the scheduling information in memory.
  • all running scheduling information will be lost.
  • a certain scheduled task needs to be executed 100 times. If the system crashes when it is executed 50 times, the task execution counter will start from 0 when the system restarts. Therefore, in this embodiment, the scheduling information is stored in the database. After the database saves the scheduling information, even if the system is restarted after the system crashes, the scheduling information of the scheduled task can still be restored. As in the previous example, the task needs to be executed 100 times. The next time the system crashes and runs again, the counter will count from 51.
  • the database is used to save the scheduling information to achieve the persistence of the scheduling information.
  • PostgreSQL is a free object-relational database server (database management system).
  • PostgreSQL provides relatively open source database systems (such as MySQL and Firebird), and proprietary systems (such as (Such as Oracle, Sybase, and Microsoft SQL Server).
  • PostgreSQL can be set to a C / S (client / server) environment.
  • the core of the PostgreSQL installation is the database server process. Applications that need to access data stored in the database must pass through the database process, so that client programs cannot directly access the data.
  • PostgreSQL supports spatial query, text of various sizes, server-side scripting, and full-text search.
  • PostgreSQL is set as the scheduling information store in this embodiment, and provides convenience for subsequent modification of scheduling rules and scheduling information, and SQL query.
  • the non-relational database MongoDB can be used as the database for scheduling information. MongoDB can quickly, safely and automatically implement failover of a node or data center. Although MongoDB does not support transactions, its insertion speed is very fast. Given MongoDB's weak data structure model, adding a new field will not have any impact on the old table, so the entire process will be very fast. When the application changes, there is no need for a special database administrator to modify the database schema. In addition, MongoDB is suitable for class persistence. Classes can be serialized into JSON and stored in MongoDB. Therefore, in this embodiment, when a scheduled task needs to load a large amount of low-value business data, such as log collection, selecting MongoDB can obtain an efficient storage speed.
  • the database that stores the scheduling information can also choose the in-memory database Redis.
  • Redis is an open source log-type, Key-Value database that is written in ANSI C language, supports the network, can be based on memory and can also be persistent, and provides APIs in multiple languages. It supports many value storage types, including string (string), list (linked list), set (set), zset (sorted set-ordered set), and hash (hash type).
  • Redis supports advanced server-side atomic operations such as different unordered and ordered lists, intersections and unions between unordered and ordered sets.
  • Redis also supports master-slave synchronization. Data can be synchronized from the master server to any number of slave servers.
  • the slave server can be the master server associated with other slave servers. This allows Redis to perform single-level tree replication. When the timing task in this embodiment is more complicated, if Redis is selected, a better storage operation can be obtained by selecting Redis.
  • step S2 the scheduling server configures a scheduler interface, and modifies the scheduling rules and scheduling information of any scheduled task in the scheduled task framework through the scheduler interface.
  • the scheduler interface is encapsulated as an API interface and placed in the django project.
  • this embodiment adds a scheduler interface, and uses this interface to modify the scheduling rules and scheduling information, such as the original 3 minute schedule
  • One-time tasks can be modified once every 5 minutes through the scheduler interface.
  • the API interface is an open interface.
  • the front desk can call the API interface to query, add, delete, and modify the database, reduce the coupling between modules, improve the flexibility of the database, and facilitate system upgrades. Therefore, in order to facilitate modification, the scheduler interface It is encapsulated as an API interface.
  • Django is an open source web application framework. After the encapsulated API interface is placed in a django project for invocation, the API interface is opened. When you need to modify the scheduling rules or scheduling information, you can complete the modification through the web application call. Modification is very convenient.
  • step S3 the scheduling server is configured with a monitor, and the monitor performs a SQL query on the database storing the scheduling information according to a predetermined monitoring method, and obtains the monitoring result and notifies.
  • the monitor in this step uses a developed application monitoring platform and a third-party monitoring tool.
  • the third-party monitoring tool can be configured through a web interface for monitoring purposes.
  • the monitor in this step can use SQL server database monitoring software, in order to use SQL to query the database to achieve real-time monitoring and analysis of the data in the database.
  • the monitoring method can be set to monitor the polling interval.
  • the time interval can be set to monitor in hours or a day as required.
  • SQL is an abbreviation for Structured Query Language. It is a database query and programming language. It is set to access data and query, update, and manage relational database systems. It is also the extension of database script files. It allows users to work on high-level data structures, does not require users to specify how to store data, and does not require users to understand specific data storage methods, so different database systems with completely different underlying structures can use the same structured query language As an interface for data entry and management. Structured query language statements can be nested, which makes it extremely flexible and powerful. In this embodiment, SQL queries are used to monitor the database in real time, and abnormalities occurring in task scheduling can be found and modified in time.
  • a new scheduling engine is introduced to implement more high-frequency task scheduling.
  • the scheduling information is written to the database.
  • the scheduling information is persisted.
  • the API interface is used to dynamically modify the scheduling rules and scheduling information.
  • the monitoring is introduced. It can timely detect abnormal scheduling and make timely modification through API interface.
  • step S1 includes a preset timing task framework:
  • the scheduling server automatically installs the python program by calling the configure tool, and the scheduled task framework is included in the python program, which completes the setting of the scheduled task framework.
  • Python Computer Programming Language
  • Python's syntax is concise and clear, with rich and powerful libraries, which can easily link various modules (especially C / C ++) made in other languages.
  • the timing task framework based on python program has a more concise coding, which can be easily integrated with web frameworks such as django for restful API development, and is more tightly integrated with existing scheduling platform functions.
  • the timing task framework can select the Quartz module or the apscheduler module, and the apscheduler module is preferred.
  • the apscheduler module is based on a Python scheduled task framework of Quartz, which implements all the functions of Quartz and is easy to use. apscheduler provides calling rules based on dates, fixed intervals, and crontab types, and can persist tasks. Based on these functions, the apscheduler module is adopted as the new scheduling engine, and the scheduled tasks implemented meet the needs of high-frequency tasks.
  • the apscheduler module is a python package, and the deployment of the python package is set with the strategy of packaging the python files as a whole.
  • the configure tool contains a large number of command-line options.
  • the scheduling server can modify the command-line options to invoke the configure tool to automatically install Python programs. After the automatic installation is complete, you can use the apscheduler module.
  • the apscheduler module is deployed as a timing task framework by using a python file as a whole package.
  • the module is rich in functions, easy to use, and can be well compatible with existing scheduling platforms.
  • step S1 further includes adding a timing task:
  • Step S102A instantiate a scheduler class
  • Step S102B adding task content and scheduling information
  • Step S102C Configure a calling rule and trigger a task in a calling manner.
  • a new scheduled task is:
  • step S102B the scheduling information is also stored in the database: an ORM tool is preset in the scheduling server, and the scheduling server reads the scheduling information by calling the ORM tool and writes it into the database in a predetermined data form. The storage of scheduling information is completed.
  • ORM tool is the abbreviation of object-relational mapping. It is used to realize the conversion between data of different types of systems in object-oriented programming language. It provides a conceptual and easy-to-understand method for modeling data.
  • the SQLAlchemy module of the ORM tool shields the syntax differences of the underlying database. You only need to configure the database connection information to write data to the database.
  • ORM tools and SQLAlchemy module can support relational databases and non-relational databases and in-memory databases.
  • the scheduling information is written into the database in real time by using the SQLAlchemy module of the ORM tool.
  • the ORM tool is compatible with various existing databases and can be better applied to the existing scheduling platform to realize the function of persistent scheduling information.
  • the ORM tool only needs to configure the connection information of the database to achieve the writing of information.
  • a typical configuration is as follows:
  • the writing process is similar to the above-mentioned relational database PostgreSQL.
  • the python program further includes a scheduler module, and the scheduling server uses the schedule_job interface of the scheduler module as the scheduler interface to complete the modification of the scheduling rules and scheduling information.
  • the reschedule_job interface is encapsulated as an API interface and is placed in the django project.
  • the scheduling rule includes a scheduling mode
  • the scheduling mode includes a blocking mode or an asynchronous mode
  • the scheduling server completes the modification of the scheduling mode through a scheduler interface.
  • the scheduling method can also be modified, such as blocking mode or asynchronous mode.
  • the next schedule waits for the end of the previous schedule. Specifically, if the frequency of a certain schedule is once every 3 minutes, if one of the tasks corresponding to this schedule runs for more than 3 minutes, for the blocking mode, the next call will wait for the task to finish running before starting the scheduling.
  • asynchronous mode there is no need to wait for the last execution to complete asynchronous scheduling, covering the common scenarios in practical applications. Specifically, if the frequency of a certain schedule is once every 3 minutes, if one of the tasks corresponding to this schedule runs for more than 3 minutes, for asynchronous mode, after 3 minutes, the task will be rescheduled regardless of the previous task. How it works.
  • step S3 the monitoring method uses a set polling time interval for monitoring.
  • the monitor can use the developed application monitoring platform and third-party monitoring tools.
  • the third-party monitoring tools can be configured through the web interface for monitoring purposes.
  • the monitoring method of the monitor adopts setting the polling time interval for monitoring. According to the time interval, SQL query is regularly performed on the database storing the scheduling information.
  • the monitoring result is abnormal information in the database, including error information and timeout information when scheduling tasks, and the monitoring result is notified by mail or phone.
  • the result of the query is real-time scheduling information.
  • Common monitoring contents include: whether there is an error in the task scheduling, whether the scheduled task running time exceeds a certain threshold and has not been completed. .
  • the monitor is to monitor whether these abnormal conditions will occur in the database. When there are abnormal conditions, the monitoring results will be notified to the relevant personnel by email or phone. The relevant personnel will timely find and modify problems in task scheduling based on the monitoring results.
  • a high-frequency task scheduling system is proposed. As shown in FIG. 3, the high-frequency task scheduling system includes:
  • the timing task configuration unit is set to schedule the server to call the timing task framework preset in the database for timing task scheduling.
  • the timing task framework presets timing tasks.
  • the timing task is configured with task content, scheduling rules and scheduling information, and the scheduling information is stored.
  • the interface configuration unit is configured to configure a scheduler interface for the scheduling server, modify the scheduling rules and scheduling information of any scheduled task in the scheduled task framework through the scheduler interface, and the scheduler interface is encapsulated as an API interface and placed in the django project;
  • the monitoring unit is configured to configure a monitor for the scheduling server, and the monitor performs a SQL query on the database storing the scheduling information according to a predetermined monitoring method, and notifies after obtaining the monitoring result.
  • the timed task configuration unit is further configured to automatically complete the setting of the timed task framework.
  • the timed task configuration unit includes an automatic installation module configured to schedule the scheduled server to automatically install python by calling the configure tool when the timed task framework is preset. Program, the scheduled task framework is included in the python program, which completes the deployment of the scheduled task framework.
  • the timing task configuration unit is further configured to complete the storage of scheduling information.
  • the timing task configuration unit includes: a storage scheduling information module configured to preset an ORM tool in the scheduling server when the scheduling information is stored, and the scheduling server passes The ORM tool is called to read the scheduling information and write it into the database in a predetermined data form, which completes the storage of the scheduling information.
  • the monitoring method in the monitoring unit adopts setting a polling time interval for monitoring.
  • the monitoring result is abnormal information in the database, including error information and timeout information when scheduling tasks, and the monitoring result is notified by mail or phone.
  • the interface configuration unit includes a modification module configured to use a scheduler module's schedule_job interface as a scheduler interface to complete the modification of scheduling rules and scheduling information.
  • the scheduler module is included in the python program.
  • the database is a relational database, a non-relational database, or an in-memory database.
  • the scheduling rule includes a scheduling mode
  • the scheduling mode includes a blocking mode or an asynchronous mode
  • the scheduling server completes the modification of the scheduling mode through a scheduler interface.
  • a computer device which includes a database and a processor.
  • the database stores computer-readable instructions.
  • the processor is caused to implement the foregoing operations when the computer-readable instructions are executed. The steps in the high-frequency task scheduling method in the embodiment.
  • a storage medium storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform high-frequency tasks in the foregoing embodiments. Steps in a scheduling method.
  • the storage medium may be a non-volatile storage medium.
  • the program may be stored in a computer-readable storage medium.
  • the storage medium may include: Read-only database (ROM, Read Only Memory), random access database (RAM, Random Access Memory), magnetic disk or optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种高频任务调度方法、系统、计算机设备和存储介质,涉及调度技术领域。高频任务调度方法包括:调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,定时任务框架预设有定时任务,定时任务配置有任务内容、调度规则和调度信息,调度信息存储在数据库中(S1)。调度服务器配置调度程序接口,对定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中(S2)。调度服务器配置监控器,按照预定的监控方式对数据库进行SQL查询,获取监控结果后进行通知(S3)。本技术方案通过引入定时任务框架作为新的调度引擎,根据定时任务配置启动任务调度,支持分钟、甚至是秒级别的高频任务调度。

Description

高频任务调度方法、系统、计算机设备和存储介质
本申请要求于2018年05月21日提交中国专利局、申请号为201810485941.7、发明名称为“高频任务调度方法、系统、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及调度技术领域,尤其涉及一种任务调度方法、系统、计算机设备和存储介质。
背景技术
任务调度是指基于给定时间点,给定时间间隔或者给定执行次数自动执行任务。在企业级应用中,经常会制定一些计划任务,即在某个时间点内做某件事情,核心是以时为关注点,即在一个特定的时间点,系统执行指定的一个操作,任务调度涉及多线程并发、线程池维护、运行时间规则解析、运行现场的保护以恢复等方面。现有任务调度方式主要有MapReduce框架下的任务调度、基于粒子群算法的任务调度、云计算环境下的任务调度与虚拟机整合和定时任务调度服务系统。
上述这些任务调度方式虽能实现任务调度,但是这些任务调度平台都仅能以时为关注点,只能设定以小时为级别的任务调度,无法支持以分钟级别或者秒级别的高频任务调度,造成设置次数有限,任务执行等待时间较长,无法及时进行调度任务,无法下发分钟级别或者秒级别的任务,也限制了调度平台的应用场景。
发明内容
有鉴于此,有必要针对现有技术中只能设定以小时为级别的任务调度问题, 提供一种高频任务调度方法、系统、计算机设备和存储介质。
一种高频任务调度方法,包括:
调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,所述定时任务框架预设有定时任务,所述定时任务配置有任务内容、调度规则和调度信息,调度信息存储在所述数据库中;
调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
调度服务器配置监控器,所述监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
一种高频任务调度系统,包括:
定时任务配置单元,设置为调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,所述定时任务框架预设有定时任务,所述定时任务配置有任务内容、调度规则和调度信息,调度信息存储在所述数据库中;
接口配置单元,设置为调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
监控单元,设置为调度服务器配置监控器,所述监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
一种计算机设备,包括数据库和处理器,所述数据库中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,所述定时任务框架预设有定时任务,所述定时任务配置有任务内容、调度规则和调度信息,调度信息存储在所述数据库中;
调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
调度服务器配置监控器,所述监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,所述定时任务框架预设有定时任务,所述定时任务配置有任务内容、调度规则和调度信息,调度信息存储在所述数据库中;
调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
调度服务器配置监控器,所述监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
上述高频任务调度方法、装置、计算机设备和存储介质,包括调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,定时任务框架预设有定时任务,定时任务配置有任务内容、调度规则和调度信息,调度信息存储在数据库中;调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;调度服务器配置监控器,监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。本技术方案通过引入定时任务框架作为新的调度引擎,根据定时任务配置启动任务调度,支持分钟、甚至是秒级别的高频任务调度;将调度信息写入数据库实现了调度信息持久化;通过API接口实现动态修改任务调度频度,以支持定时、时间间隔等方式的任务调度;引入监控器,实现对调度过程的实时监控,及时 发现并修改任务调度中出现的问题。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。
图1为本申请一个实施例中的高频任务调度方法的流程图;
图2为本申请一个实施例中的新增定时任务的流程图;
图3为本申请一个实施例中的高频任务调度系统的结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。
图1为本申请一个实施例中的高频任务调度方法的流程图,如图1所示,一种高频任务调度方法,包括以下步骤:
步骤S1,调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,定时任务框架预设有定时任务,定时任务配置有任务内容、调度规则和调度信息,调度信息存储在数据库中。
本实施例中的调度服务器可以选定Linux服务器。Linux服务器是一种采用Linux系统的网络服务器,用于业务处理应用,如网络和系统管理、数据库管理和Web服务等,是具备高性能和开源性的一种服务器。Linux服务器具有极佳的系统稳定性、安全性,由于采用多用户操作系统,因此具有好的灵活性和可扩展性,无论处理器或机器架构都能很好地进行资源上的容纳。Linux服务器上的软件是免费,因而Linux服务器在应用开发上更能节约成本。大多数的用户业务,都可以用Linux系统对业务进行更加自由的开发。
在Linux服务器中引入了新的调度引擎,即在Linux服务器预设了用于定时任务调度的定时任务框架。Linux服务器预设时,可以通过调用configure工具自动安装包含有定时任务框架的python程序,自动安装定时任务框架。Linux服务器启动定时任务框架功能前,在Linux服务器上根据需要可新增若干个定时任务,为每一个定时任务配置其对应的任务内容、调度规则和调度信息。其中,任务内容为任务执行代码,调度规则为任务触发方式,调度信息为任务触发后的调度内容。配置好定时任务后,Linux服务器启动定时任务框架,每个定时任务会根据其调度规则,按任务内容执行相应调度信息。
如调度服务器选择不同时,在定时任务框架安装时,只需通过修改操作系统的环境变量,将定时任务框架安装到所选择的调度服务器即可完成定时任务框架的部署工作。
定时任务框架默认的存储是简单的把调度信息保存在内存中,当程序中途停止或者系统奔溃时,所有运行的调度信息都会丢失。比如某一定时任务需要执行100次,如果执行到50次时系统崩溃了,系统重启时任务的执行计数器将从0开始。因此本实施例将调度信息存储在数据库中,数据库保存调度信息后,即使系统崩溃后重新启动,定时任务的调度信息依然能得到恢复,如前述例子中,任务需要执行100次,如果执行到50次时系统崩溃后重新运行,计数器将从51开始计数,本实施例使用了数据库保存调度信息实现了调度信息持久化。
保存调度信息的数据库可以选用关系型数据库PostgreSQL,PostgreSQL是 一个自由的对象-关系数据库服务器(数据库管理系统),PostgreSQL提供了相对其他开放源代码数据库系统(比如MySQL和Firebird),和专有系统(比如Oracle、Sybase、和Microsoft SQL Server)之外的另一种选择。PostgreSQL可以设置为C/S(客户/服务器)环境,PostgreSQL安装核心是数据库服务端进程,需要访问存储在数据库中的数据的应用程序必须通过数据库进程,这样客户端程序无法直接访问数据。PostgreSQL支持空间查询、支持各种大小的text、支持服务器端脚本、自带全文搜索功能。PostgreSQL设置为本实施例中的调度信息存储,为后续修改调度规则和调度信息,及SQL查询提供便捷。
保存调度信息的数据库可以选用非关系型数据库MongoDB。MongoDB可以快速、安全及自动化的实现节点或数据中心故障转移。MongoDB虽然不支持事务,但是其插入速度非常快,鉴于MongoDB的弱数据结构模式,添加1个新字段不会对旧表格有任何影响,因此整个过程会非常快速。在应用程序发生改变时,也不需要专门的数据库管理员去修改数据库模式。另外,MongoDB适合类的持久化,类可以被序列化成JSON并储存在MongoDB。因此,在本实施例中,当定时任务需要加载大量低价值的业务数据,比如日志收集时,选择MongoDB能得到高效的存储速度。
保存调度信息的数据库还可以选用内存数据库Redis。Redis是一个开源的使用ANSI C语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。它支持众多的value存储类型,包括string(字符串)、list(链表)、set(集合)、zset(sorted set--有序集合)和hash(哈希类型)。Redis支持不同无序、有序的列表,无序、有序的集合间的交集、并集等高级服务器端原子操作。Redis还支持主从同步,数据可以从主服务器向任意数量的从服务器上同步,从服务器可以是关联其他从服务器的主服务器,这使得Redis可执行单层树复制。本实施例中的定时任务如存储类型较为复杂时,选择Redis能得到更好的存储操作。
步骤S2,调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API 接口放置在django工程中。
为了实现动态修改任务调度规则和调度信息,以支持定时、时间间隔等方式的任务调度,本实施例增设了调度程序接口,通过该接口完成对调度规则和调度信息的修改,如原先3分钟调度一次的任务,可通过调度程序接口修改成5分钟一次。
API接口是一种开放接口,前台可通过调用API接口来实现对数据库的查询、增删改,降低模块间的耦合性,提高数据库的灵活性,便于系统升级变更,因此为了便于修改,调度程序接口被封装为API接口。
django是一个开放源代码的Web应用框架,将封装的API接口放置在django工程中供调用后,实现了API接口的开放,在需要修改调度规则或调度信息时,通过Web应用调用即可完成修改,修改及其方便。
步骤S3,调度服务器配置监控器,监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
本步骤中的监控器采用已开发的应用监督平台和第三方监控工具,其中第三方监控工具可以通过web界面进行配置,实现监控目的。例如,本步骤中的监控器可以采用SQL server数据库监控软件,以便于采用SQL查询数据库,实现对数据库内数据的实时监控和分析。监控方式可以采用设置轮询时间间隔进行监控。时间间隔可以根据需要,设定以小时为单位或一天为单位进行监控。
SQL是对结构化查询语言的一种简称,是一种数据库查询和程序设计语言,设置为存取数据以及查询、更新和管理关系数据库系统,同时也是数据库脚本文件的扩展名。它允许用户在高层数据结构上工作,不要求用户指定对数据的存放方法,也不需要用户了解具体的数据存放方式,所以具有完全不同底层结构的不同数据库系统,可以使用相同的结构化查询语言作为数据输入与管理的接口。结构化查询语言语句可以嵌套,这使它具有极大的灵活性和强大的功能。本实施例采用SQL查询对数据库进行实时监控,能及时发现并修改任务调度中出现的异常。
本实施例通过引入新的调度引擎,实现了更高频任务调度,调度信息写入数据库的方式,实现了调度信息持久化,通过API接口实现了动态修改调度规则和调度信息的功能,引入监控其,能及时发现调度异常并通过API接口进行及时修改。
在一个实施例中,步骤S1包括预设定时任务框架:
调度服务器通过调用configure工具自动安装python程序,定时任务框架包含在python程序中,即完成定时任务框架的设置。
python(计算机程序设计语言)是一种面向对象的解释型计算机程序设计语言。python语法简洁清晰,具有丰富和强大的库,能够把用其他语言制作的各种模块(尤其是C/C++)很轻松地联结在一起。基于python程序的定时任务框架其编码更简洁,能方便与django等web框架结合进行restful API开发,与现有调度平台功能结合更为紧密。
定时任务框架可以选用Quartz模块或apscheduler模块,优选apscheduler模块。apscheduler模块基于Quartz的一个Python定时任务框架,实现了Quartz的所有功能,且使用方便。apscheduler提供了基于日期、固定时间间隔以及crontab类型的调用规则,并且可以持久化任务。基于这些功能,采用apscheduler模块作为新的调度引擎,实现的定时任务满足高频任务的需求。
以apscheduler模块设置在Linux调度服务器为例,apscheduler模块为python包,python包的部署采取和python文件整体打包的策略进行设置。而configure工具包含有大量的命令行选项,调度服务器通过修改命令行选项来调用configure工具能够实现Python程序的自动安装,自动按照完成后,即可使用apscheduler模块。
本实施例采用python文件整体打包的方式部署apscheduler模块作为定时任务框架,模块功能丰富,使用方便,能很好的兼容现有调度平台。
在一个实施例中,如图2所示,步骤S1还包括新增定时任务:
步骤S102A:实例化一个scheduler类;
步骤S102B:添加任务内容和调度信息;
步骤S102C:配置调用规则,并以调用的方式触发任务。
例如新增定时任务为:
Figure PCTCN2018104362-appb-000001
表示每隔5s执行一次my_job函数,输出hello world。
在一个实施例中,在步骤S102B中,还将调度信息存储在数据库中:在调度服务器中预设有ORM工具,调度服务器通过调用ORM工具读取调度信息,以预定的数据化形式写入数据库中,即完成调度信息的存储。
ORM工具是对象关系映射的简称,用于实现面向对象编程语言里不同类型系统的数据之间的转换,它提供了概念性的、易于理解的模型化数据的方法。ORM工具的SQLAlchemy模块屏蔽了底层数据库的语法差异,只需配置数据库的连接信息即可将数据写入数据库。ORM工具且SQLAlchemy模块可以支持关系型数据库及非关系型数据库和内存数据库。
本实施例借助ORM工具的SQLAlchemy模块对调度信息实时写入数据库中,ORM工具兼容各类现有数据库,能更好的应用于现有调度平台中,实现了调度信息持久化的功能。
具体的,采用ORM工具只需配置数据库的连接信息,即可实现信息的写入工作,ORM工具的SQLAlchemy支持的关系型数据库,数据库采用关系型数据库 postgresql时,一个典型的配置如下:
Figure PCTCN2018104362-appb-000002
如数据库采用非关系型数据库MongoDB和内存数据库Redis时,写入过程均和上述关系型数据库PostgreSQL类似。
在一个实施例中,步骤S2中,python程序中还包含scheduler模块,调度服务器将scheduler模块的reschedule_job接口作为调度程序接口,完成对调度规则和调度信息的修改。reschedule_job接口放在被封装为API接口放置在django工程中。
具体的,如将原先3分钟调度一次的任务,修改成5分钟调度一次,可以采用如下方式:
scheduler.reschedule_job('my_job_id',trigger='cron',minute='*/5')
在一个实施例中,调度规则包括调度方式,调度方式包括阻塞模式或异步模式,调度服务器通过调度程序接口完成对调度方式的修改。
通过API接口在进行修改时,除了对定时、时间间隔、crontab表达式方式的调度进行修改外,还可以对调度方式进行修改,如选用阻塞模式或异步模式。
在阻塞模式下,下一次调度会等待上一次调度的结束。具体的,如某个调度的频度为3分钟一次,若其中某一次这个调度对应的任务运行时间超过了3分钟,对于阻塞模式,下一次调用会等待这一次任务运行完了才开始调度。
在异步模式下则无需等待上一次执行完毕,进行异步调度,覆盖了实际应用中常见的场景。具体的,如某个调度的频度为3分钟一次,若其中某一次这个调度对应的任务运行时间超过了3分钟,对于异步模式,到了3分钟后,开 始重新调度该任务而不管上一次任务的运行情况如何。
在一个实施例中,步骤S3中,监控方式采用设置轮询时间间隔进行监控。
监控器可以采用已开发的应用监督平台和第三方监控工具,其中第三方监控工具可以通过web界面进行配置,实现监控目的。监控器的监控方式采用设置轮询时间间隔进行监控时,根据时间间隔,定期对存储有调度信息的数据库进行SQL查询。
在一个实施例中,步骤S3中,监控结果为数据库中的异常信息,包括调度任务时的报错信息、超时信息,监控结果通过邮件或电话的方式进行通知。
监控器通过轮询时间间隔进行SQL查询后,查询的结果为实时的调度信息,监控常见内容有,在任务调度时是否存在报错情况,调度任务运行时间是否超过某一阈值还未完成等异常情况。监控器就是去监控数据库中是否会产生这些异常情况,当存在异常情况时,将监控结果通过邮件或电话等方式通知到相关人员,相关人员根据监控结果,及时发现并修改任务调度中的问题。
在一个实施例中,提出了一种高频任务调度系统,如图3所示,高频任务调度系统包括:
定时任务配置单元,设置为调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,定时任务框架预设有定时任务,定时任务配置有任务内容、调度规则和调度信息,调度信息存储在数据库中;
接口配置单元,设置为调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
监控单元,设置为调度服务器配置监控器,监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
在一个实施例中,定时任务配置单元还设置为自动完成定时任务框架的设置,定时任务配置单元包括:自动安装模块,设置为在预设定时任务框架时, 调度服务器通过调用configure工具自动安装python程序,定时任务框架包含在python程序中,即完成定时任务框架的部署。
在一个实施例中,定时任务配置单元还设置为完成调度信息的存储,定时任务配置单元包括:存储调度信息模块,设置为在调度信息存储时,在调度服务器中预设ORM工具,调度服务器通过调用ORM工具读取调度信息,以预定的数据化形式写入数据库中,即完成调度信息的存储。
在一个实施例中,监控单元中的监控方式采用设置轮询时间间隔进行监控。
在一个实施例中,监控结果为数据库中的异常信息,包括调度任务时的报错信息、超时信息,监控结果通过邮件或电话的方式进行通知。
在一个实施例中,接口配置单元包括:修改模块,设置为调度服务器将scheduler模块的reschedule_job接口作为调度程序接口,完成对调度规则和调度信息的修改,scheduler模块包含在所述python程序中。
在一个实施例中,数据库采用关系型数据库、非关系型数据库或内存数据库。
在一个实施例中,调度规则包括调度方式,调度方式包括阻塞模式或异步模式,调度服务器通过调度程序接口完成对调度方式的修改。
在一个实施例中,提出了一种计算机设备,包括数据库和处理器,数据库中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行计算机可读指令时实现上述各实施例里高频任务调度方法中的步骤。
在一个实施例中,提出了一种存储有计算机可读指令的存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各实施例里高频任务调度方法中的步骤。其中,存储介质可以为非易失性存储介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存 储介质中,存储介质可以包括:只读数据库(ROM,Read Only Memory)、随机存取数据库(RAM,Random Access Memory)、磁盘或光盘等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请一些示例性实施例,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种高频任务调度方法,包括:
    调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,所述定时任务框架预设有定时任务,所述定时任务配置有任务内容、调度规则和调度信息,调度信息存储在所述数据库中;
    调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
    调度服务器配置监控器,所述监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
  2. 根据权利要求1所述的高频任务调度方法,其中,所述调度服务器通过调用configure工具自动安装python程序,所述定时任务框架包含在所述python程序中,即完成定时任务框架的设置。
  3. 根据权利要求1所述的高频任务调度方法,其中,调度信息存储时,在调度服务器中预设有ORM工具,调度服务器通过调用ORM工具读取调度信息,以预定的数据化形式写入数据库中,即完成调度信息的存储。
  4. 根据权利要求1所述的高频任务调度方法,其中,所述监控方式采用设置轮询时间间隔进行监控;
    所述监控结果为数据库中的异常信息,包括调度任务时的报错信息、超时信息,所述监控结果通过邮件或电话的方式进行通知。
  5. 根据权利要求2所述的高频任务调度方法,其中,所述python程序中还包含scheduler模块,所述调度服务器将scheduler模块的reschedule_job接口作为调度程序接口,完成对调度规则和调度信息的修改。
  6. 根据权利要求1所述的高频任务调度方法,其中,所述数据库采用关系型数据库、非关系型数据库或内存数据库。
  7. 根据权利要求1所述的高频任务调度方法,其中,所述调度规则包括调度方式,所述调度方式包括阻塞模式或异步模式,所述调度服务器通过所述调度程序接口完成对调度方式的修改。
  8. 一种高频任务调度系统,包括:
    定时任务配置单元,设置为调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,所述定时任务框架预设有定时任务,所述定时任务配置有任务内容、调度规则和调度信息,调度信息存储在所述数据库中;
    接口配置单元,设置为调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
    监控单元,设置为调度服务器配置监控器,所述监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
  9. 根据权利要求8所述的高频任务调度系统,其中,所述定时任务配置单元还设置为自动完成定时任务框架的设置,所述定时任务配置单元包括:
    自动安装模块,设置为所述调度服务器通过调用configure工具自动安装python程序,所述定时任务框架包含在所述python程序中,即完成定时任务框架的设置。
  10. 根据权利要求8所述的高频任务调度系统,其中,所述定时任务配置单元还设置为完成调度信息的存储,所述定时任务配置单元包括:
    存储调度信息模块,设置为调度信息存储时,在调度服务器中预设有ORM工具,调度服务器通过调用ORM工具读取调度信息,以预定的数据化形式写入数据库中,即完成调度信息的存储。
  11. 根据权利要求8所述的高频任务调度系统,其中,所述监控单元中的所述监控方式采用设置轮询时间间隔进行监控;
    所述监控结果为数据库中的异常信息,包括调度任务时的报错信息、超时 信息,所述监控结果通过邮件或电话的方式进行通知。
  12. 根据权利要求9所述的高频任务调度系统,其中,所述接口配置单元包括:
    修改模块,设置为所述调度服务器将scheduler模块的reschedule_job接口作为调度程序接口,完成对调度规则和调度信息的修改,所述scheduler模块包含在所述python程序中。
  13. 根据权利要求8所述的高频任务调度系统,其中,所述数据库采用关系型数据库、非关系型数据库或内存数据库。
  14. 根据权利要求8所述的高频任务调度系统,其中,所述调度规则包括调度方式,所述调度方式包括阻塞模式或异步模式,所述调度服务器通过所述调度程序接口完成对调度方式的修改。
  15. 一种计算机设备,包括数据库和处理器,所述数据库中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
    调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,所述定时任务框架预设有定时任务,所述定时任务配置有任务内容、调度规则和调度信息,调度信息存储在所述数据库中;
    调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
    调度服务器配置监控器,所述监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
  16. 根据权利要求15所述的计算机设备,其中,预设数据库中的所述定时任务框架时,使得所述处理器执行:所述调度服务器通过调用configure工具自动安装python程序,所述定时任务框架包含在所述python程序中,即完成 所述定时任务框架的设置。
  17. 根据权利要求15所述的计算机设备,其中,所述调度信息存储在所述数据库中时,使得所述处理器执行:所述调度服务器通过调用预设在所述调度服务器中的ORM工具读取调度信息,以预定的数据化形式写入所述数据库中,即完成所述调度信息的存储。
  18. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
    调度服务器调用预设在数据库中的定时任务框架,进行定时任务调度,所述定时任务框架预设有定时任务,所述定时任务配置有任务内容、调度规则和调度信息,调度信息存储在所述数据库中;
    调度服务器配置调度程序接口,通过调度程序接口对定时任务框架中任一定时任务的调度规则和调度信息进行修改,调度程序接口被封装为API接口放置在django工程中;
    调度服务器配置监控器,所述监控器按照预定的监控方式对存储有调度信息的数据库进行SQL查询,获取监控结果后进行通知。
  19. 根据权利要求18所述的存储介质,其中,预设数据库中的所述定时任务框架时,使得一个或多个处理器执行:所述调度服务器通过调用configure工具自动安装python程序,所述定时任务框架包含在所述python程序中,即完成所述定时任务框架的设置。
  20. 根据权利要求18所述的存储介质,其中,所述调度信息存储在所述数据库中时,使得一个或多个处理器执行:所述调度服务器通过调用预设在所述调度服务器中的ORM工具读取调度信息,以预定的数据化形式写入所述数据库中,即完成所述调度信息的存储。
PCT/CN2018/104362 2018-05-21 2018-09-06 高频任务调度方法、系统、计算机设备和存储介质 WO2019223173A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810485941.7 2018-05-21
CN201810485941.7A CN108762900A (zh) 2018-05-21 2018-05-21 高频任务调度方法、系统、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2019223173A1 true WO2019223173A1 (zh) 2019-11-28

Family

ID=64007174

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104362 WO2019223173A1 (zh) 2018-05-21 2018-09-06 高频任务调度方法、系统、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN108762900A (zh)
WO (1) WO2019223173A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078383A (zh) * 2019-12-24 2020-04-28 浙江诺诺网络科技有限公司 一种定时任务的管理方法、装置、设备及存储介质
CN114696888A (zh) * 2022-04-25 2022-07-01 北京航天驭星科技有限公司 卫星测运控系统的端口任务处理方法、装置、设备及介质
CN115829034A (zh) * 2023-01-09 2023-03-21 白杨时代(北京)科技有限公司 一种构建知识规则执行框架的方法及装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109753354A (zh) * 2018-11-26 2019-05-14 平安科技(深圳)有限公司 基于多线程的流媒体任务的处理方法、装置及计算机设备
CN110427253A (zh) * 2019-07-04 2019-11-08 中国建设银行股份有限公司 机器人资源任务周期管控方法及装置
CN111782351A (zh) * 2019-07-18 2020-10-16 北京京东尚科信息技术有限公司 一种分布式任务调度的方法和装置
CN110688212A (zh) * 2019-09-26 2020-01-14 山东浪潮通软信息科技有限公司 基于quartz的定时管理方法及系统
CN113127158B (zh) * 2019-12-30 2023-07-14 百度在线网络技术(北京)有限公司 用于执行数据处理任务的方法及装置
CN111460772A (zh) * 2020-02-28 2020-07-28 上海维信荟智金融科技有限公司 自动化报表处理方法及系统
CN111475272A (zh) * 2020-04-07 2020-07-31 四川虹美智能科技有限公司 控制Java Web应用定时任务的方法、装置及任务调度平台
CN112187570A (zh) * 2020-09-15 2021-01-05 中信银行股份有限公司 一种风险侦测方法、装置、电子设备和可读存储介质
CN113485799B (zh) * 2021-06-21 2023-10-20 上海百秋新网商数字科技有限公司 多库执行同一定时任务的方法、装置、设备及存储介质
CN115333939A (zh) * 2022-07-27 2022-11-11 青岛海尔空调电子有限公司 支持边缘计算的物联网网关的运行控制方法、设备及介质
CN115599656A (zh) * 2022-12-12 2023-01-13 深圳联友科技有限公司(Cn) 基于Java自定义SQL监控告警实现的方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156920A (zh) * 2011-04-20 2011-08-17 铁道部运输局 基于多维规律定制的任务管理调度系统及方法
CN102880503A (zh) * 2012-08-24 2013-01-16 新浪网技术(中国)有限公司 数据分析系统及数据分析方法
US20160260040A1 (en) * 2013-11-14 2016-09-08 Huawei Technologies Co., Ltd. Computer Device, Method, and Apparatus for Scheduling Business Flow

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156920A (zh) * 2011-04-20 2011-08-17 铁道部运输局 基于多维规律定制的任务管理调度系统及方法
CN102880503A (zh) * 2012-08-24 2013-01-16 新浪网技术(中国)有限公司 数据分析系统及数据分析方法
US20160260040A1 (en) * 2013-11-14 2016-09-08 Huawei Technologies Co., Ltd. Computer Device, Method, and Apparatus for Scheduling Business Flow

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078383A (zh) * 2019-12-24 2020-04-28 浙江诺诺网络科技有限公司 一种定时任务的管理方法、装置、设备及存储介质
CN114696888A (zh) * 2022-04-25 2022-07-01 北京航天驭星科技有限公司 卫星测运控系统的端口任务处理方法、装置、设备及介质
CN115829034A (zh) * 2023-01-09 2023-03-21 白杨时代(北京)科技有限公司 一种构建知识规则执行框架的方法及装置
CN115829034B (zh) * 2023-01-09 2023-05-30 白杨时代(北京)科技有限公司 一种构建知识规则执行框架的方法及装置

Also Published As

Publication number Publication date
CN108762900A (zh) 2018-11-06

Similar Documents

Publication Publication Date Title
WO2019223173A1 (zh) 高频任务调度方法、系统、计算机设备和存储介质
US11314698B2 (en) Dynamically performing data processing in a data pipeline system
US11373127B2 (en) Connection multiplexing for a parallel processing environment
US8762929B2 (en) System and method for exclusion of inconsistent objects from lifecycle management processes
US8347291B2 (en) Enterprise scheduler for jobs performable on the remote system by receiving user specified values for retrieved job definitions comprising metadata representation of properties of jobs
US10970277B2 (en) System and method for dynamic conversion of database accessing scripts during runtime in a mainframe rehosting platform
US11556396B2 (en) Structure linked native query database management system and methods
CN110532074B (zh) 一种多租户模式SaaS服务集群环境的任务调度方法及系统
US10613853B2 (en) Updating software components through online stores
US10089188B2 (en) Simulated deployment of database artifacts
WO2020010702A1 (zh) 日志搜索方法、系统、计算机设备和存储介质
US9772911B2 (en) Pooling work across multiple transactions for reducing contention in operational analytics systems
US20140053157A1 (en) Asynchronous execution flow
US20190042149A1 (en) Writing composite objects to a data store
WO2023124543A1 (zh) 用于大数据的数据处理方法和数据处理装置
CN111966692A (zh) 针对数据仓库的数据处理方法、介质、装置和计算设备
CN108399095B (zh) 支持动态管理定时任务的方法、系统、设备和存储介质
CN116089027A (zh) 一种基于jvm的非阻塞分布式计划任务调度方法
CN113886111A (zh) 一种基于工作流的数据分析模型计算引擎系统及运行方法
US10534640B2 (en) System and method for providing a native job control language execution engine in a rehosting platform
US9336067B2 (en) Method and system to release IMS resources used by IMS batch application programs
US8892519B2 (en) Command interpreter
Kukreti et al. CloneHadoop: Process Cloning to Reduce Hadoop's Long Tail
CN109062559B (zh) 一种数据处理方法和装置
Marques Design and implementation of a mapReduce architecture for angraDB

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18919576

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18919576

Country of ref document: EP

Kind code of ref document: A1