CN113485799B - Method, device, equipment and storage medium for executing same timing task by multiple libraries - Google Patents

Method, device, equipment and storage medium for executing same timing task by multiple libraries Download PDF

Info

Publication number
CN113485799B
CN113485799B CN202110685384.5A CN202110685384A CN113485799B CN 113485799 B CN113485799 B CN 113485799B CN 202110685384 A CN202110685384 A CN 202110685384A CN 113485799 B CN113485799 B CN 113485799B
Authority
CN
China
Prior art keywords
task
data
timing
timing task
brand
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.)
Active
Application number
CN202110685384.5A
Other languages
Chinese (zh)
Other versions
CN113485799A (en
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.)
Shanghai Baiqiu New Online Commerce Digital Technology Co ltd
Original Assignee
Shanghai Baiqiu New Online Commerce Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Baiqiu New Online Commerce Digital Technology Co ltd filed Critical Shanghai Baiqiu New Online Commerce Digital Technology Co ltd
Priority to CN202110685384.5A priority Critical patent/CN113485799B/en
Publication of CN113485799A publication Critical patent/CN113485799A/en
Application granted granted Critical
Publication of CN113485799B publication Critical patent/CN113485799B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for executing the same timing task by multiple libraries, which aim at the problem that the configuration and maintenance of the timing task are complex because a developer is required to write Cron items for task scheduling of the traditional timing task.

Description

Method, device, equipment and storage medium for executing same timing task by multiple libraries
Technical Field
The invention belongs to the technical field of task management, and particularly relates to a method, a device, equipment and a storage medium for executing the same timing task by multiple libraries.
Background
With respect to timed tasks, some functions need to be performed on a regular basis or once a half day, and possibly once a half hour. The traditional approach is that the developer needs to write a Cron entry for each task that needs to be scheduled, and this task scheduling is not in the original source code control, and it is necessary to log into the server using SSH and then maintain these Cron entries. When the Cron items are maintained, the operation is complex, technical operation is required by professionals, and the requirement of enterprises on specific human resources is increased; moreover, not all systems need to perform for some tasks, and in cases where part of the execution is not performed, maintenance is more complex and does not appear to be intuitive. The timed task can be edited on the screen, so that the timed task can be easily configured.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for executing the same timing task by multiple libraries, wherein the timing task is edited by a front-end page, so that a user can finish the configuration of the timing task by himself, a developer does not need to write codes, and the maintenance difficulty of the timing task is reduced.
In order to solve the problems, the technical scheme of the invention is as follows:
a method for multiple libraries to perform the same timed task, comprising:
creating a front page for configuring a timing task, wherein the front page at least comprises a task name, task description, a code entry for task execution, task execution time, task execution period and a brand library for executing the task; wherein the brand library is a plurality of selectable data items;
the server receives configuration data of the front-end page timing task, performs validity verification on the configuration data, and stores the verification result in a database;
retrieving a database by adopting a task scheduler, acquiring timing task data configured through a front page, and splicing pims in front of command of the acquired timing task data, wherein cron is a task scheduling command;
and the task scheduler circularly executes the timing task data, and when the task execution time is reached, the task scheduling command is executed, and codes required to be executed by the timing task are called, so that the same timing task is executed by the multi-brand library.
According to an embodiment of the present invention, the code for calling the timing task to be executed further includes:
and acquiring timing task data in a task scheduling command, searching a database to acquire a brand library required to execute the timing task, searching the brand library, and executing the timing task.
According to an embodiment of the present invention, the retrieving the brand library from the database further includes:
if the timing task is not configured with the brand library, the timing task is executed by default for all brand libraries.
According to an embodiment of the present invention, the creating a front page for configuring a timing task further includes:
acquiring development requirements of a front-end page, wherein the development requirements comprise task names, task descriptions, code entries for task execution, task execution time, task execution periods and a brand library for executing tasks, and the brand library is a data item capable of being selected by multiple items;
based on the development requirement of the front-end page, confirming a required target page component and a target data mark of required data;
inquiring a target data source and an acquisition mode corresponding to the target data mark according to a pre-configured configuration file, acquiring target data through the target data source and the acquisition mode, and pre-storing the data source and the acquisition mode corresponding to each data mark by the configuration file;
packaging the target data according to a format required by the target page component;
and rendering the target page component by using the packaged target data to obtain the target page component with corresponding functions.
According to an embodiment of the present invention, the verifying validity of the configuration data further includes:
judging whether a keyword code exists in the configuration data;
judging whether null values exist in the configuration data;
and judging the code format corresponding to the configuration data.
According to an embodiment of the present invention, the retrieving the database with the task scheduler further includes:
the task scheduler of laravel is used to retrieve the database by calling the cron_config method under CrontabService.
An apparatus for multiple libraries to perform the same timing task, comprising:
the configuration page creation module is used for creating a front-end page for configuring the timing task, wherein the front-end page at least comprises a task name, task description, a code entry for executing the task, task execution time, a task execution period and a brand library for executing the task; wherein the brand library is a plurality of selectable data items;
the task data processing module is used for receiving configuration data of the front-end page timing task by the server, verifying the validity of the configuration data, and storing the verification result in the database;
the task scheduling module adopts a task scheduler to search a database, acquires timing task data configured through a front page, and splices pim:: cron in front of command of the acquired timing task data to obtain a task scheduling command;
and the task execution module circularly executes the timed task data by adopting a task scheduler, and when the task execution time is reached, executes a task scheduling command, and calls codes required to be executed by the timed task so as to realize that the same timed task is executed by the multi-brand library.
An apparatus for multiple libraries to perform the same timing task includes a memory having computer readable instructions stored therein and a processor that when executing the computer readable instructions implements a method for multiple libraries to perform the same timing task in one embodiment of the invention.
A computer readable medium storing a computer program which, when executed by one or more processors, implements a method for multiple libraries to perform the same timing tasks in an embodiment of the invention.
By adopting the technical scheme, the invention has the following advantages and positive effects compared with the prior art:
according to the method for executing the same timing task by the multiple libraries in the embodiment of the invention, aiming at the problem that the configuration and maintenance of the timing task are complex because the traditional timing task requires a developer to write Cron items for task scheduling, the configuration of the timing task is paged by creating the front-end page for configuring the timing task, so that a user can complete the configuration of the timing task by himself without writing codes by the developer, and the maintenance difficulty of the timing task is reduced.
Drawings
FIG. 1 is a flow chart of a method for multiple libraries to perform the same timing task in one embodiment of the invention;
FIG. 2 is a diagram of a front page according to an embodiment of the present invention;
FIG. 3 is a code diagram of verifying validity of configuration data according to an embodiment of the present invention;
FIG. 4 is a code diagram of acquiring timing task data in an embodiment of the present invention;
FIG. 5 is a code diagram of a task scheduling command acquisition in an embodiment of the present invention;
FIG. 6 is a code diagram of a timing task according to an embodiment of the present invention;
FIG. 7 is a block diagram of a device for multiple libraries to perform the same timing tasks in one embodiment of the invention;
FIG. 8 is a schematic diagram of an apparatus for multiple libraries to perform the same timing tasks in one embodiment of the invention.
Detailed Description
The following describes in further detail a method, apparatus, device and storage medium for executing the same timing task by multiple libraries according to the present invention with reference to the accompanying drawings and the specific embodiments. Advantages and features of the invention will become more apparent from the following description and from the claims.
Example 1
Aiming at the problem that the conventional timing task needs to write Cron items for task scheduling and the configuration and maintenance of the timing task are complex, the embodiment provides a method for executing the same timing task by multiple libraries.
Referring to fig. 1, the method for performing the same timing task by the multiple libraries includes:
s1: creating a front page for configuring a timing task, wherein the front page at least comprises a task name, task description, a code entry for task execution, task execution time, task execution period and a brand library for executing the task; wherein the brand library is a plurality of selectable data items;
s2: the server receives configuration data of the front-end page timing task, performs validity verification on the configuration data, and stores the verification result in a database;
s3: retrieving a database by adopting a task scheduler, acquiring timing task data configured through a front page, and splicing pims in front of command of the acquired timing task data, wherein cron is a task scheduling command;
s4: and the task scheduler circularly executes the timing task data, and when the task execution time is reached, the task scheduling command is executed, and codes required to be executed by the timing task are called, so that the same timing task is executed by the multi-brand library.
In step S1, creating a front page for configuring a timing task further includes:
s11: acquiring development requirements of a front-end page, wherein the development requirements comprise task names, task descriptions, code entries for task execution, task execution time, task execution periods and a brand library for executing tasks, and the brand library is a data item capable of being selected by multiple items;
s12: based on the development requirement of the front-end page, confirming a required target page component and a target data mark of required data;
s13: inquiring a target data source and an acquisition mode corresponding to the target data mark according to a pre-configured configuration file, acquiring target data through the target data source and the acquisition mode, and pre-storing the data source and the acquisition mode corresponding to each data mark by the configuration file;
s14: packaging the target data according to a format required by the target page component;
s15: and rendering the target page component by using the packaged target data to obtain the target page component with corresponding functions.
In step S11, development requirements of the front-end page are acquired. Specifically, a developer can input corresponding front-end development requirements according to requirements, and the front-end development requirements comprise information such as required components, data, events and the like. Referring to fig. 2, for the configuration of the timing task, at least a task name, a task description, a code entry for executing the task, a task execution time, a task execution period (task type), a brand library for executing the task, and whether to send mail are included on a page. Wherein the brand library is a multi-item selectable data item (also referred to as a page component). The brand library specifically refers to a product library of each merchant under an electronic commerce product information management system (PIM).
In step S12, the target page components required and the target data flags of the required data are confirmed based on the front-end development requirements.
Specifically, the front-end page development framework includes a plurality of page components, where the page components correspond to a certain visual object on the page, such as a button, an input frame, a drop-down frame, a multiple-selection frame, a single-selection frame, and the like, and the page components are configured to display data obtained from the back end on the page, where the display manner may be that the content of the data is directly displayed, or that a certain state of the visual object determined according to the data is displayed. In the embodiment, when the front-end page for configuring the timing task is created, an input box, a drop-down box, a single selection box and a multiple selection box are adopted as page components.
The data flag is a flag of data required for realizing a corresponding function based on a front-end development requirement, for example, when a drop-down frame component for executing a task is required to be developed, a target page component required in the front-end development requirement is a drop-down frame page component, and a target data flag of required data is time. Note that, the correspondence between the data and the data flag is defined in advance by the developer, for example: the data mark corresponding to the task execution time data is a time point, and the data mark corresponding to the task code data is a code name.
In step S13, the source and the acquisition mode of the target data corresponding to the target data markers are queried according to the pre-configured configuration file, the target data is acquired through the source and the acquisition mode of the target data, and the configuration file pre-stores the source and the acquisition mode of the data corresponding to each data marker.
Specifically, the configuration file is preconfigured, wherein the corresponding relation between the data mark and the data source and the obtaining mode is stored, the target data source and the obtaining mode corresponding to the target data mark can be inquired through the target data mark, and then the target data is obtained according to the target data source and the obtaining mode.
In step S14, the target data is packaged in a format required by the target page component. Specifically, after the target data is obtained, the target data needs to be packaged according to a format required by the target page, for example, the target data required by the drop-down frame component needs to be packaged into a list form during task execution period selection, and if the drop-down frame cannot display all the data, a drop-down bar needs to be set in the drop-down frame.
In step S15, the target page component is rendered by using the packaged target data, so as to obtain the target page component with the corresponding function. Specifically, the target data and the target page component are automatically converted into format data which can be rendered by means of the action, so that page rendering is realized through the action, and finally the target page component with corresponding functions is obtained.
According to the method, the configuration file is preset, when a developer performs front-end development, only the target data mark is required to be transmitted, then the configuration file is utilized to inquire the source and the acquisition mode of the target data corresponding to the target data mark, corresponding target data is acquired through the source and the acquisition mode of the target data, the developer does not need to write the logic of the target data in the code of each page component, the code of front-end page development is simplified, the code logic is clearer, the efficiency of front-end page development is further improved, in the subsequent maintenance process, if the code logic of the target data is changed, only the code logic of the data source and/or the acquisition mode is required to be modified, the code in the page component is not required to be modified one by one, and the maintenance difficulty is reduced.
In step S2, the server receives the configuration data of the front-end page timing task, performs validity verification on the configuration data, and stores the verification result in the database.
Referring to fig. 3, after a user creates a timing task on a front page, the execution code, execution time, brand library and other configuration data designated by the timing task are newly added into a database through a server. The server firstly receives the configuration data of the front-end page timing task, and performs validity verification on the configuration data. The validity verification includes: judging whether a keyword code exists in the configuration data; judging whether null values exist in the configuration data; and judging the code format corresponding to the configuration data. And saving the configuration data passing verification in a database.
In step S3, a task scheduler is adopted to search a database, timing task data configured through a front page is obtained, and a pim is spliced before command of the obtained timing task data to obtain a task scheduling command.
Referring to fig. 4, the present embodiment uses the task scheduler of laravel to retrieve the database by calling the cron_config method under CrontabService, and obtain all the timed task data configured by the front page.
Then, the result of the database search is processed, please refer to FIG. 5, and the obtained command of the timing task data is spliced pi m:: cron in front to obtain a task scheduling command, such as pi m:: cron class@method.
In step S4, the task scheduler circularly executes the timed task data, and when the task execution time is reached, executes the task scheduling command, and invokes the code to be executed by the timed task, so as to implement the execution of the same timed task by the multi-brand library.
Referring to FIG. 6, the task scheduler loops execution of timed task data, transmits execution data for each timed task to a Schedule class, which executes once every minute, and when the time for timed task execution is reached, executes the php artisannpim:: cron class@method command, invoking code that the timed task needs to execute.
Specifically, the code that calls the timed task to be executed includes: and acquiring timing task data in the task scheduling command, acquiring a brand library which needs to execute the timing task by a retrieval database, retrieving the brand library, and executing the timing task. Referring to FIG. 6, parameters transmitted by task scheduling, i.e., pim, are obtained first, wherein parameters including class@method after cron are class, method is a method in class, then a database is searched to find out brand libraries needed to execute the timing task, if no brand libraries are set, all brand libraries are default to execute, finally the brand libraries are circulated to execute the timing task respectively, and finally the purpose that different brand libraries execute the same timing task is achieved.
Example two
The present embodiment provides an apparatus for multiple libraries to perform the same timing task, please refer to fig. 7, the apparatus for multiple libraries to perform the same timing task includes:
the configuration page creation module 1 is used for creating a front-end page for configuring the timing task, wherein the front-end page at least comprises a task name, a task description, a code entry for executing the task, task execution time, a task execution period and a brand library for executing the task; wherein the brand library is a plurality of selectable data items;
the task data processing module 2 is used for receiving configuration data of the front-end page timing task by the server, verifying the validity of the configuration data, and storing the verification result in the database;
the task scheduling module 3 adopts a task scheduler to search a database, acquires timing task data configured through a front page, and splices pim::: cron in front of command of the acquired timing task data to obtain a task scheduling command;
and the task execution module 4 adopts a task scheduler to circularly execute the timing task data, and when the task execution time is reached, the task scheduling command is executed, and codes required to be executed by the timing task are called, so that the same timing task is executed by the multi-brand library.
The functions and implementation methods of the configuration page creation module 1, the task data processing module 2, the task scheduling module 3, and the task execution module 4 are described in the first embodiment, and are not described herein again.
Example III
The second embodiment describes the device for executing the same timing task by the multi-library according to the present invention from the point of view of the modularized functional entity, and the following describes the device for executing the same timing task by the multi-library according to the present invention from the point of view of hardware processing in detail.
Referring to fig. 8, the device 500 for performing the same timing task in multiple libraries may vary in configuration or performance, and may include one or more processors (central processing units, CPU) 510 (e.g., one or more processors) and memory 520, one or more storage media 530 (e.g., one or more mass storage devices) storing applications 533 or data 532. Wherein memory 520 and storage medium 530 may be transitory or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations in the device 500 that perform the same timing task on multiple libraries.
Further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on multiple devices 500 that perform the same timing task.
The device 500 for multiple libraries to perform the same timing task may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input/output interfaces 560, and/or one or more operating systems 531, such as Windows Server, vista, etc.
It will be appreciated by those skilled in the art that the configuration of the device shown in fig. 8 for multiple banks performing the same timing tasks does not constitute a limitation on the device for multiple banks performing the same timing tasks, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and which may also be a volatile computer readable storage medium. The computer readable storage medium has instructions stored therein which, when executed on a computer, cause the computer to perform the steps of the method of the first embodiment in which multiple libraries perform the same timing task.
The modules in the second embodiment may be stored in a computer-readable storage medium if implemented as software functional modules and sold or used as a separate product. Based on this understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of software, and the computer software is stored in a storage medium, and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only memory (ROM), a random access memory (Random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and device described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The embodiments of the present invention have been described in detail with reference to the drawings, but the present invention is not limited to the above embodiments. Even if various changes are made to the present invention, it is within the scope of the appended claims and their equivalents to fall within the scope of the invention.

Claims (8)

1. A method for multiple libraries to perform the same timed task, comprising:
creating a front page for configuring a timing task, wherein the front page at least comprises a task name, task description, a code entry for task execution, task execution time, task execution period and a brand library for executing the task; wherein the brand library is a plurality of selectable data items;
the server receives configuration data of the front-end page timing task, performs validity verification on the configuration data, and stores the verification result in a database;
retrieving a database by adopting a task scheduler, acquiring timing task data configured through a front page, and splicing pims in front of command of the acquired timing task data, wherein cron is a task scheduling command;
the task scheduler circularly executes the timing task data, and when the task execution time is reached, a task scheduling command is executed, and codes required to be executed by the timing task are called, so that the same timing task is executed by the multi-brand library;
the task scheduler circularly executes the timing task data, transmits the execution data of each timing task to a Schedule class, and the Schedule class executes once every minute, and executes a preset command when the execution time of the timing task is reached, and invokes codes required to be executed by the timing task;
the code for invoking the timed task to execute further comprises:
acquiring timing task data in a task scheduling command, searching a database to acquire a brand library required to execute the timing task, searching the brand library, and executing the timing task;
firstly, parameters transmitted by task scheduling are obtained, namely pims, wherein parameters at the back of cron are class@method, class is class, method is a method in class, then a database is searched to find brand libraries needing to execute the timing task, if the brand libraries are not set, all brand libraries are defaulted to be executed, finally, the brand libraries are circulated to execute the timing task respectively, and finally, the aim that different brand libraries execute the same timing task is achieved.
2. The method of multiple libraries for performing the same timed task of claim 1, wherein the retrieving database to obtain a library of brands that are required to perform the timed task further comprises:
if the timing task is not configured with the brand library, the timing task is executed by default for all brand libraries.
3. The method for multiple libraries to perform the same timed task of claim 1, wherein creating a front page for configuring the timed task further comprises:
acquiring development requirements of a front-end page, wherein the development requirements comprise task names, task descriptions, code entries for task execution, task execution time, task execution periods and a brand library for executing tasks, and the brand library is a data item capable of being selected by multiple items;
based on the development requirement of the front-end page, confirming a required target page component and a target data mark of required data;
inquiring a target data source and an acquisition mode corresponding to the target data mark according to a pre-configured configuration file, acquiring target data through the target data source and the acquisition mode, and pre-storing the data source and the acquisition mode corresponding to each data mark by the configuration file;
packaging the target data according to a format required by the target page component;
and rendering the target page component by using the packaged target data to obtain the target page component with corresponding functions.
4. The method for multiple libraries to perform the same timed task of claim 1, wherein the validating configuration data further comprises:
judging whether a keyword code exists in the configuration data;
judging whether null values exist in the configuration data;
and judging the code format corresponding to the configuration data.
5. The method for multiple libraries to perform the same timed task of claim 1, wherein retrieving a database using a task scheduler further comprises:
the task scheduler of laravel is used to retrieve the database by calling the cron_config method under CrontabService.
6. An apparatus for multiple libraries to perform the same timed task, comprising:
the configuration page creation module is used for creating a front-end page for configuring the timing task, wherein the front-end page at least comprises a task name, task description, a code entry for executing the task, task execution time, a task execution period and a brand library for executing the task; wherein the brand library is a plurality of selectable data items;
the task data processing module is used for receiving configuration data of the front-end page timing task by the server, verifying the validity of the configuration data, and storing the verification result in the database;
the task scheduling module adopts a task scheduler to search a database, acquires timing task data configured through a front page, and splices pim:: cron in front of command of the acquired timing task data to obtain a task scheduling command;
the task execution module adopts a task scheduler to circularly execute the timing task data, and when the task execution time is reached, a task scheduling command is executed, and codes required to be executed by the timing task are called to realize that the same timing task is executed by the multi-brand library;
the task scheduler circularly executes the timing task data, transmits the execution data of each timing task to a Schedule class, and the Schedule class executes once every minute, and executes a preset command when the execution time of the timing task is reached, and invokes codes required to be executed by the timing task;
the code for invoking the timed task to execute further comprises:
acquiring timing task data in a task scheduling command, searching a database to acquire a brand library required to execute the timing task, searching the brand library, and executing the timing task;
firstly, parameters transmitted by task scheduling are obtained, namely pims, wherein parameters at the back of cron are class@method, class is class, method is a method in class, then a database is searched to find brand libraries needing to execute the timing task, if the brand libraries are not set, all brand libraries are defaulted to be executed, finally, the brand libraries are circulated to execute the timing task respectively, and finally, the aim that different brand libraries execute the same timing task is achieved.
7. An apparatus for multiple libraries to perform the same timed task, comprising a memory and a processor, the memory having stored therein computer readable instructions which when executed by the processor, implement the method of multiple libraries to perform the same timed task of any one of claims 1 to 5.
8. A computer readable medium storing a computer program which, when executed by one or more processors, implements a method of multiple libraries according to any of claims 1 to 5 for performing the same timing task.
CN202110685384.5A 2021-06-21 2021-06-21 Method, device, equipment and storage medium for executing same timing task by multiple libraries Active CN113485799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110685384.5A CN113485799B (en) 2021-06-21 2021-06-21 Method, device, equipment and storage medium for executing same timing task by multiple libraries

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110685384.5A CN113485799B (en) 2021-06-21 2021-06-21 Method, device, equipment and storage medium for executing same timing task by multiple libraries

Publications (2)

Publication Number Publication Date
CN113485799A CN113485799A (en) 2021-10-08
CN113485799B true CN113485799B (en) 2023-10-20

Family

ID=77935527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110685384.5A Active CN113485799B (en) 2021-06-21 2021-06-21 Method, device, equipment and storage medium for executing same timing task by multiple libraries

Country Status (1)

Country Link
CN (1) CN113485799B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108475190A (en) * 2016-02-12 2018-08-31 微软技术许可有限责任公司 The natural language task that creation is experienced for third party completes platform
CN108762900A (en) * 2018-05-21 2018-11-06 平安科技(深圳)有限公司 High frequency method for scheduling task, system, computer equipment and storage medium
CN110058930A (en) * 2019-04-18 2019-07-26 中国联合网络通信集团有限公司 Method for scheduling task and equipment
US10467050B1 (en) * 2015-04-06 2019-11-05 State Farm Mutual Automobile Insurance Company Automated workflow creation and management
CN111857998A (en) * 2020-07-10 2020-10-30 科大国创云网科技有限公司 Configurable timing task scheduling method and system
CN112527258A (en) * 2020-12-16 2021-03-19 平安国际智慧城市科技股份有限公司 Page component development method, system, terminal and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10467050B1 (en) * 2015-04-06 2019-11-05 State Farm Mutual Automobile Insurance Company Automated workflow creation and management
CN108475190A (en) * 2016-02-12 2018-08-31 微软技术许可有限责任公司 The natural language task that creation is experienced for third party completes platform
CN108762900A (en) * 2018-05-21 2018-11-06 平安科技(深圳)有限公司 High frequency method for scheduling task, system, computer equipment and storage medium
CN110058930A (en) * 2019-04-18 2019-07-26 中国联合网络通信集团有限公司 Method for scheduling task and equipment
CN111857998A (en) * 2020-07-10 2020-10-30 科大国创云网科技有限公司 Configurable timing task scheduling method and system
CN112527258A (en) * 2020-12-16 2021-03-19 平安国际智慧城市科技股份有限公司 Page component development method, system, terminal and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Liuyan Liu .Dependent task placement and scheduling with function configuration in edge computing.《IWQoS '19: Proceedings of the International Symposium on Quality of Service》.2019,1-10. *
李小文 ; 刘玉龙 ; .基于Puppet的自动化部署工具的设计与实现.软件.2015,(12),232-235. *

Also Published As

Publication number Publication date
CN113485799A (en) 2021-10-08

Similar Documents

Publication Publication Date Title
US20190129734A1 (en) Data collection workflow extension
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
US7769821B2 (en) Systems and methods for enhanced meassage support using a generic client proxy
US20120331010A1 (en) Systems And Methods For Performing A Query On A Distributed Database
US10175954B2 (en) Method of processing big data, including arranging icons in a workflow GUI by a user, checking process availability and syntax, converting the workflow into execution code, monitoring the workflow, and displaying associated information
US10437815B2 (en) Identification of code object dependencies
CN111782452A (en) Method, system, device and medium for interface contrast test
CN111784318A (en) Data processing method and device, electronic equipment and storage medium
CN106789170B (en) Task processing method and device
CN113485799B (en) Method, device, equipment and storage medium for executing same timing task by multiple libraries
CN113760242A (en) Data processing method, device, server and medium
CN103678687A (en) Project establishment method and device based on configuration system
US20220342885A1 (en) Anticipatory pre-execution of data queries
CN114546220A (en) Page configuration method and device, storage medium and computer equipment
CN115291872A (en) Data processing method, electronic device and storage medium
CN116263717A (en) Order service processing method and device based on event
CN114047999A (en) Page configuration method, system, electronic equipment and storage medium
CN114168624A (en) Data analysis method, computing device and storage medium
CN113971074A (en) Transaction processing method and device, electronic equipment and computer readable storage medium
CN111930720A (en) Data tilt processing method, system, electronic device and medium
CN112783633A (en) Data updating system and method based on resource mutual exclusion scheduling model
CN112486529A (en) Global equipment timing upgrading method, system, server and storage medium
CN111045720A (en) Code management method, code management system, server, and medium
CN112445470A (en) Dynamic rule creating method and system based on newly added scene
CN112784195A (en) Page data publishing method and system

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
CB02 Change of applicant information

Address after: 200335 floor 2, building B, No. 1358 Xiehe Road, Changning District, Shanghai

Applicant after: Shanghai baiqiu new online commerce Digital Technology Co.,Ltd.

Address before: 200335 room 2403, floor 1, building 8, No. 33, Guangshun Road, Changning District, Shanghai

Applicant before: Shanghai baiqiu e-commerce Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant