CN109614159B - Method and device for distributing and importing planning tasks - Google Patents

Method and device for distributing and importing planning tasks Download PDF

Info

Publication number
CN109614159B
CN109614159B CN201710940156.1A CN201710940156A CN109614159B CN 109614159 B CN109614159 B CN 109614159B CN 201710940156 A CN201710940156 A CN 201710940156A CN 109614159 B CN109614159 B CN 109614159B
Authority
CN
China
Prior art keywords
task
server
servers
plan
domain
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
CN201710940156.1A
Other languages
Chinese (zh)
Other versions
CN109614159A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710940156.1A priority Critical patent/CN109614159B/en
Publication of CN109614159A publication Critical patent/CN109614159A/en
Application granted granted Critical
Publication of CN109614159B publication Critical patent/CN109614159B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

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 Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for distributing and importing a plan task, which are characterized by firstly determining a plurality of servers needing to execute the plan task to be issued, and then checking whether the servers are in the current domain one by one; and if the current domain is the current domain, acquiring a plan task executable file corresponding to the plan task to be issued, and then distributing the plan task executable file to the plurality of servers. The server receives the executable file of the plan task and then executes the executable file directly, and the execution result is that the XML file and the directory structure corresponding to the plan task to be issued are led into the appointed position. By utilizing the method, the to-be-issued planning task is actively distributed to a plurality of servers needing to execute the to-be-issued planning task through the domain control server, so that the automatic concurrent issuing of the planning task is realized, and the issuing speed and efficiency of the planning task are improved.

Description

Method and device for distributing and importing planning tasks
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for distributing and importing a plan task.
Background
In the running and maintaining process of the Windows server, tens of servers and even hundreds of servers in a domain are often distributed, deployed and processed by the same program, that is, the programs are respectively run on different servers. In order to automatically run the programs deployed on different servers at a given time, the programs are generally managed uniformly by using a task planning program provided by a windows system.
Currently, the process of importing a scheduled task to a server that needs to execute the scheduled task is that each server schedules the task management server to download the corresponding scheduled tasks one by one, and then executes the downloaded scheduled tasks. When the number of nodes executing the planned tasks is large, the downloading mode one by one is adopted, the required downloading total time is long, the overall speed is slow, and the efficiency is low.
Disclosure of Invention
In view of the above problems, the present invention provides a method and an apparatus for distributing and importing a plan task to solve the technical problem of resource shortage caused by computing storage data by using a test cluster. The specific technical scheme is as follows:
in a first aspect, the present application provides a method for distributing a plan task, which is applied to a domain control server, and includes: determining a plurality of servers for executing the to-be-issued planning tasks;
sequentially checking whether the plurality of servers are in the current domain;
when the plurality of servers are determined to be in the current domain, acquiring a plan task executable file corresponding to the to-be-issued plan task, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to the to-be-issued plan task and importing related instruction information;
distributing the plan task executable file to the plurality of servers so that the servers can import the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
Optionally, when it is determined that the plurality of servers are in the current domain, acquiring a plan task executable file corresponding to the to-be-issued plan task, including:
acquiring an extensible markup language file and a directory structure corresponding to the to-be-issued planned task from a template server configured with the to-be-issued planned task;
acquiring import related instruction information;
and encapsulating the extensible markup language file corresponding to the to-be-issued planning task, the directory structure and the import related instruction information into the executable file of the planning task.
Optionally, when it is determined that the plurality of servers are in the current domain, acquiring a plan task executable file corresponding to the to-be-issued plan task, including:
and acquiring the executable file of the plan task from the template server configured with the plan task to be issued, wherein the executable file of the plan task is obtained by encapsulating the extensible markup language file, the directory structure and the related instruction importing information by the template server.
Optionally, the sequentially checking whether the plurality of servers are in the current domain includes:
acquiring a computer name of the server;
judging whether the computer name of the server contains the domain name of the current domain or not;
when the computer name contains the domain name of the current domain, determining that the server is in the current domain;
and when the domain name of the current domain is not contained in the computer name, determining that the server is not in the current domain.
Optionally, the method further comprises: and when the server is not in the current domain, adding the server into the current domain.
Optionally, distributing the planned task executable to the plurality of servers comprises:
adding a group policy on the domain control server;
and respectively sending the plan task executable files to the plurality of servers according to the group strategy.
In a second aspect, an embodiment of the present application further provides a method for importing a planned task, which is applied to a server for executing the planned task, and includes:
receiving a plan task executable file distributed by a domain control server, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to a plan task to be executed and a related instruction, and the domain control server issues the plan task executable file to the server after detecting that the server is in a current domain;
analyzing the executable file of the plan task to obtain the extensible markup language file, the directory structure and the related instruction information for importing;
and importing the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
In a third aspect, the present application further provides a device for distributing a planned task, which is applied to a domain control server, and includes: the determining module is used for determining a plurality of servers for executing the to-be-issued planning tasks;
the checking module is used for checking whether the plurality of servers are in the current domain in sequence;
the acquisition module is used for acquiring a plan task executable file corresponding to the plan task to be issued when the plurality of servers are determined to be in the current domain, and the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to the plan task to be issued and related instruction information;
and the distribution module is used for distributing the executable file of the planned task to the plurality of servers so that the servers can import the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
In a fourth aspect, the present application further provides a planned task importing apparatus, which is applied to a server for executing a planned task, and includes:
the receiving module is used for receiving a plan task executable file distributed by a domain control server, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to a plan task to be executed and a related instruction, and is issued to the server after the domain control server detects that the server is in a current domain;
the analysis module is used for analyzing the plan task executable file to obtain the extensible markup language file, the directory structure and the related instruction importing information;
and the import module is used for importing the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
In a fifth aspect, the present application provides a storage medium having stored thereon a program which, when executed by a processor, implements the scheduled task distribution method of the first aspect.
In a sixth aspect, the present application provides a processor, where the processor is configured to execute a program, and the program executes the method for distributing the planned tasks according to the first aspect.
In a seventh aspect, the present application provides a storage medium having a program stored thereon, the program implementing the scheduled task importing method according to the second aspect when executed by a processor.
In an eighth aspect, the present application provides a processor, where the processor is configured to execute a program, and the program executes the method for importing the planned tasks according to the second aspect.
By means of the technical scheme, the plan task distribution method provided by the invention is applied to the domain control server, a plurality of servers needing to execute the plan task to be issued are determined, and then whether the servers are all in the current domain is checked one by one; and if the current domain is the current domain, acquiring a plan task executable file corresponding to the plan task to be issued, and then distributing the plan task executable file to the plurality of servers. The server receives the executable file of the plan task and then executes the executable file directly, and the execution result is that the XML file and the directory structure corresponding to the plan task to be issued are led into the appointed position. By utilizing the method, the to-be-issued planning task is actively distributed to a plurality of servers needing to execute the to-be-issued planning task through the domain control server, so that the automatic concurrent issuing of the planning task is realized, and the issuing speed and efficiency of the planning task are improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating a method for distributing tasks according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating a process of verifying whether a server is in a current domain according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating another method for distributing scheduling tasks according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for importing a planned task according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of a scheduled task distribution apparatus according to an embodiment of the present application;
fig. 6 is a block diagram illustrating a planned task import apparatus according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a flowchart of a method for importing a scheduled task according to an embodiment of the present application is shown, where the method is applied in a domain control server, and as shown in fig. 1, the method may include the following steps:
s110, determining a plurality of servers for executing the to-be-issued planning tasks.
And the domain control server acquires a plurality of servers executing the planned tasks according to the configuration information of the planned tasks to be issued. The plurality of servers herein may be a portion (e.g., two or more) or all of the servers that perform the delivery plan task.
S120, whether the plurality of servers are all in the current domain is checked in sequence. If all are in the current domain, executing S130; if the current domain exists, executing S150;
a Domain (Domain) is an independently operating unit in a Windows network, and is a logical organization unit of both a Windows network operating system and the Internet, and in the Windows network operating system, a Domain is a security boundary.
In the "domain" mode, at least one server is responsible for the authentication of each computer and user connected to the network, and is called a domain controller (i.e., a domain control server in this document), and the domain control server includes a database of information such as an account and a password of the domain, and computers belonging to the domain. When a computer is connected to a domain network, a domain control server firstly identifies whether the computer belongs to the Windows domain, whether a login account used by a user exists or not and whether a password is correct or not. If the information is incorrect, the domain control server refuses the user to log in from the computer.
The domain control server can also obtain the information of each server in the current network, and then judge whether the computers are in the current Windows domain according to the information.
In an embodiment of the present application, please refer to fig. 2, which shows a flowchart illustrating a process of verifying whether a server is in a current domain according to an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
and S121, acquiring the computer name of the server.
The domain control server can obtain information of all computers in the current network, for example, the domain control server may sequentially obtain names of computers corresponding to respective servers in the current network by using a CMD command.
S122, judging whether the computer name of the server contains the domain name of the current domain; if so, executing S123; if not, S124 is performed.
If the server is in the current domain, the computer name of the server must contain the domain name of the domain; if the server is not within the current domain, the computer name of the server does not contain the domain name of the domain. Therefore, whether the server is in the current domain can be judged by whether the domain name is contained in the computer name of the server.
S123, determining that the server is in the current domain.
S124, determining that the server is not in the current domain.
For example, if "WORKGROUP" is contained in the computer name of a server instead of a domain name, it is determined that the server is not within the current domain.
And S130, acquiring a plan task executable file corresponding to the plan task to be issued.
The executable file of the plan task is obtained according to an extensible markup language (XML) file and a directory structure corresponding to the plan task to be issued, and the import of related instruction information.
In an embodiment of the present application, the domain control server may utilize an InstallShield tool to package an XML file corresponding to a to-be-issued planning task, a directory structure of the planning task, and import related instruction information into an msi file, which is a planning task executable file.
The function of the directory structure corresponding to the planning task is to better distinguish different planning tasks or attributions of different planning tasks.
The import-related instruction information includes a file import instruction, and information related to the import file, for example, a specified location of the import file. The import-related instruction information may be input from the outside or may be generated periodically so that the server that executes the scheduled task can import the xml file or directory structure to a specified location based on the import-related instruction information.
The msi file is a program installation file developed by Windows installers, and can enable a user to install, modify and uninstall an installed program. In other words, the msi file is a packet of Windows installers, and all instructions and data related to the installation file are encapsulated in one packet. The msi file associates component files of a program with functions.
S140, distributing the executable files of the planned tasks to the plurality of servers respectively, so that the servers automatically import the XML files and the directory structures corresponding to the planned tasks to be issued to the specified positions after executing the executable files of the planned tasks.
And logging in an account with the domainadmin authority on the domain control server, and adding a group policy to the account, wherein the content of the group policy is to distribute the executable file of the planned task to all servers executing the planned task to be executed.
Because the msi file is an executable file, the server receiving the executable file of the planned task can directly execute the file, and the execution result is to import the XML file and the directory structure corresponding to the planned task to be issued into the designated position in the executable file of the planned task.
S150, adding the server into the current domain.
And if the server is determined not to be in the current domain, adding the server into the current domain so that the domain control server controls the to-be-issued planning task distribution work of each server. Then, execution continues with S130 and S140.
The method for distributing the plan tasks provided by the embodiment comprises the steps of firstly determining a plurality of servers needing to execute the plan tasks to be issued, and then checking whether the servers are in the current domain one by one; and if the current domain is the current domain, acquiring a plan task executable file corresponding to the plan task to be issued, and then distributing the plan task executable file to all the servers. The server receives the executable file of the plan task and then executes the executable file directly, and the execution result is that the XML file and the directory structure corresponding to the plan task to be issued are led into the appointed position. By utilizing the method, the to-be-issued plan task is actively distributed to each server which needs to execute the to-be-issued plan task through the domain control server, so that the automatic concurrent issuing of the plan task is realized, and the issuing speed and efficiency of the plan task are improved.
Referring to fig. 3, a flowchart of another method for importing a planned task according to an embodiment of the present application is shown, where the present application is applied to a Windows server cluster, and as shown in fig. 3, the method may include the following steps:
s210, the domain control server determines all servers executing the to-be-issued planning task.
S220, the domain control server sequentially checks whether all the servers are in the current domain; if all servers are in the current domain, executing S230; if there is a server that is not within the current domain, S270 is performed.
And S230, the domain control server acquires an XML file and a directory structure which are configured in the template server and correspond to the to-be-issued planning task.
In one embodiment of the present application, the template server may be any server that needs to perform the pending planning task. The to-be-issued planning tasks on the template server are configured in advance by operation and maintenance personnel, and the planning tasks to be set on other subsequent servers are subject to the planning tasks configured in the template server.
In an embodiment of the application, a user with a DomainAdmin authority can be used in a domain control server to obtain the login authority of a template server, so that the XML file and the directory structure corresponding to a to-be-issued planning task in the template server are remotely obtained; wherein, the user of DomainAdmin authority guarantees that the domain control server has the Remote login service (Remote Registry) and the local administrator authority of the template server.
In another embodiment of the present application, the function of the template server may be implemented in the domain control server, that is, the domain control server is preconfigured with the to-be-issued planning task.
S240, the domain control server packages the XML file and the directory structure of the planned task to be issued and the imported related instruction information into an msi file.
In another embodiment of the present application, the template server may encapsulate the XML file and the directory structure of the planned task to be issued, and the import related instruction information into an msi file, and then directly upload the encapsulated msi file to the domain control server.
The import related instruction information can be input through the outside or generated according to a period, so that the server executing the planning task can import the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
And S250, distributing the msi file to all servers executing the to-be-issued planning task by the domain control server by using a group strategy.
And S260, the server executing the to-be-issued planning task executes the msi file.
After receiving the msi file, the server directly executes the msi file, and the final execution result is to import the XML file and the directory structure corresponding to the to-be-issued planning task to the specified position specified by the planning task executable file.
And S270, adding the server into the current domain.
Adding the servers which are not in the current domain into the current domain, then returning to execute S220 to continuously judge whether other servers are in the current domain, and executing S230-S260 until all servers executing the to-be-issued planning task are in the current domain.
In the method for distributing the plan tasks provided by the embodiment, the domain control server determines a plurality of servers executing the plan tasks to be issued, and then checks whether the servers are in the current domain one by one; and if the current domain is the current domain, acquiring a plan task executable file corresponding to the plan task to be issued from the template server, and then distributing the plan task executable file to the server. The server receives the executable file of the plan task and then executes the executable file directly, and the execution result is that the XML file and the directory structure corresponding to the plan task to be issued are led into the appointed position. By utilizing the method, the to-be-issued plan task is actively distributed to each server which needs to execute the to-be-issued plan task through the domain control server, so that the automatic concurrent issuing of the plan task is realized, and the issuing speed and efficiency of the plan task are improved.
Referring to fig. 4, a flowchart of a planned task importing method according to an embodiment of the present application is shown, where the method is used in a server for executing a planned task, and as shown in fig. 4, the method may include the following steps:
s310, receiving the plan task executable file distributed by the domain control server.
After obtaining a plan task executable file of a plan task to be executed, the domain control server determines that the server executing the plan task to be executed is in the current domain, and then issues the plan task executable file to the server.
In an embodiment of the present application, the executable file of the planning task is an XML file and a directory structure corresponding to the planning task, and an msi file obtained by encapsulating the import related instruction information.
Please refer to the above method embodiment for the process of acquiring the executable file of the scheduled task by the domain control server, which is not described herein again.
S320, analyzing the executable file of the plan task to obtain an XML file and a directory structure corresponding to the plan task to be executed, and importing relevant instruction information.
After receiving the executable file of the planned task, the server analyzes the file to obtain an XML file and a directory structure corresponding to the planned task to be executed, and imports related instruction information;
s330, importing the XML file and the directory structure corresponding to the to-be-executed planning task to a specified position according to the import relevant instruction information.
The import-related instruction information includes a file import instruction, and information related to importing a file, such as an import location.
The server executes the executable file of the plan task directly, and the execution result is that the XML file and the directory structure corresponding to the plan task to be issued are led into the appointed position in the executable file of the plan task.
In the method for importing a planned task provided by this embodiment, after receiving a planned task executable file of a domain control server, a server executing the planned task parses the planned task executable file to obtain an XML file and a directory structure corresponding to the planned task to be executed, and imports related instruction information; then, the XML file and the directory structure are imported to the specified position according to the import relevant instruction information. The process of importing the plan task can be automatically completed by directly executing the received executable file of the plan task, thereby improving the efficiency of importing the plan task.
Corresponding to the embodiment of the method for distributing and importing the planning task, the application also provides an embodiment of a device for distributing and importing the planning task.
Referring to fig. 5, a block diagram of a scheduled task distribution apparatus applied in a domain control server according to an embodiment of the present application is shown.
As shown in fig. 5, the apparatus includes: a determination module 110, a verification module 120, an acquisition module 130, and a distribution module 140.
The determining module 110 is configured to determine a plurality of servers that execute the to-be-delivered scheduling task.
A checking module 120, configured to check whether the servers are in the current domain in sequence.
In an embodiment of the application, the verification module is specifically configured to obtain a computer name of the server; then, judging whether the computer name of the server contains the domain name of the current domain; if the computer name contains the domain name of the current domain, determining that the server is in the current domain; if the domain name of the current domain is not contained in the computer name, it is determined that the server is not within the current domain. Further, if the server is not in the current domain, the server is added into the current domain.
The obtaining module 130 is configured to obtain a plan task executable file corresponding to a plan task to be issued when it is determined that the plurality of servers are in the current domain.
The plan task executable file is obtained according to the extensible markup language file corresponding to the plan task to be issued, the directory structure of the extensible markup language file and the import related instruction information.
Under an application scene of the application, the domain control server encapsulates relevant information of a planned task to be issued into a planned task executable file;
in this application scenario, the obtaining module 130 is specifically configured to obtain an xml file and a directory structure corresponding to the to-be-issued planning task from a template server configured with the to-be-issued planning task; acquiring import related instruction information; and encapsulating the extensible markup language file corresponding to the to-be-issued planning task, the directory structure and the import related instruction information into the executable file of the planning task. The import related instruction information can be input through the outside or generated according to a period, so that the server executing the planning task can import the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
In another application scenario of the present application, the template server may directly encapsulate a related file of the planned task into a executable file of the planned task and upload the executable file to the domain control server.
In this application scenario, the obtaining module 130 is specifically configured to obtain the executable file of the planned task from the template server configured with the planned task to be issued, where the executable file of the planned task is obtained by encapsulating, by the template server, the xml file, the directory structure, and the information of the import related instruction corresponding to the planned task to be issued.
A distribution module 140 configured to distribute the scheduled task executable to the plurality of servers.
And the server receiving the executable file of the planned task imports the extensible markup language file and the directory structure corresponding to the planned task to be issued to a specified position according to the import relevant instruction information.
In an embodiment of the present application, the distribution module 140 is specifically configured to add a group policy on the domain control server; then, the scheduled task executables are sent to the plurality of servers according to the group policies, respectively.
The planned task distribution device provided by the embodiment determines a plurality of servers needing to execute a planned task to be issued, and then checks whether the servers are all in the current domain one by one; and if the current domain is the current domain, acquiring a plan task executable file corresponding to the plan task to be issued, and then distributing the plan task executable file to all the servers. The server receives the executable file of the plan task and then executes the executable file directly, and the execution result is that the XML file and the directory structure corresponding to the plan task to be issued are led into the appointed position. The device is used for actively distributing the planned tasks to be issued to each server which needs to execute the planned tasks to be issued through the domain control server, so that the automatic concurrent issuing of the planned tasks is realized, and the issuing speed and efficiency of the planned tasks are improved.
Referring to fig. 6, a block diagram of another planned task importing device according to an embodiment of the present application is shown, where the device is applied to a server that executes a planned task.
As shown in fig. 6, the apparatus may include: a receiving module 210, a parsing module 220, and an importing module 230.
And the receiving module 210 is configured to receive the scheduled task executable file distributed by the domain control server.
The plan task executable file is obtained according to the extensible markup language file and the directory structure corresponding to the plan task to be executed and the related instruction, and the domain control server sends the plan task executable file to the server after detecting that the server is in the current domain.
And the analysis module 220 is configured to analyze the plan task executable file to obtain an extensible markup language file, the directory structure, and the import related instruction information corresponding to the plan task to be executed.
And the importing module 230 is configured to import the extensible markup language file and the directory structure corresponding to the to-be-executed planning task to a specified location according to the import related instruction information.
In the planned task importing device provided in this embodiment, after receiving a planned task executable file of a domain control server, a server executing a planned task parses the planned task executable file to obtain an XML file and a directory structure corresponding to the planned task to be executed, and imports related instruction information; then, the XML file and the directory structure are imported to the specified position according to the import relevant instruction information. The process of importing the plan task can be automatically completed by directly executing the received executable file of the plan task, thereby improving the efficiency of importing the plan task.
The planning task distribution device comprises a processor and a memory, wherein the determining module, the verifying module, the obtaining module, the distribution module and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. One or more than one kernel can be set, plan tasks are distributed to a plurality of servers at the same time by adjusting kernel parameters, and distribution efficiency is improved.
The planning task importing device comprises a processor and a memory, wherein the receiving module, the analyzing module, the importing module and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. One or more than one kernel can be set, and the efficiency of importing the planning task is improved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the scheduled task distribution method when executed by a processor.
An embodiment of the present invention further provides another storage medium, on which a program is stored, and the program, when executed by a processor, implements the scheduled task importing method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes the planning task distribution method during running.
The embodiment of the invention provides another processor, which is used for running a program, wherein the program executes the plan task import method during running.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps:
determining a plurality of servers for executing the to-be-issued planning tasks;
sequentially checking whether the plurality of servers are in the current domain;
when the plurality of servers are determined to be in the current domain, acquiring a plan task executable file corresponding to the to-be-issued plan task, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to the to-be-issued plan task and importing related instruction information;
distributing the plan task executable file to the plurality of servers so that the servers can import the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
In an embodiment of the present application, the obtaining, when it is determined that the servers are in the current domain, a plan task executable file corresponding to the plan task to be issued includes:
acquiring an extensible markup language file and a directory structure corresponding to the to-be-issued planned task from a template server configured with the to-be-issued planned task;
and encapsulating the extensible markup language file corresponding to the to-be-issued planning task, the directory structure and the import related instruction information into the executable file of the planning task.
In an embodiment of the present application, the obtaining, when it is determined that the servers are in the current domain, a plan task executable file corresponding to the plan task to be issued includes:
and acquiring the executable file of the plan task from the template server configured with the plan task to be issued, wherein the executable file of the plan task is obtained by encapsulating the extensible markup language file, the directory structure and the related instruction importing information by the template server.
In an embodiment of the present application, said sequentially checking whether the plurality of servers are in the current domain includes:
acquiring a computer name of the server;
judging whether the computer name of the server contains the domain name of the current domain or not;
when the computer name contains the domain name of the current domain, determining that the server is in the current domain;
and when the domain name of the current domain is not contained in the computer name, determining that the server is not in the current domain.
In one embodiment of the present application, the method further comprises: and when the server is not in the current domain, adding the server into the current domain.
In one embodiment of the present application, distributing the planned task executable to the plurality of servers includes:
adding a group policy on the domain control server;
and respectively sending the plan task executable files to the plurality of servers according to the group strategy.
In another aspect, an embodiment of the present invention provides an apparatus, where the apparatus includes a processor, a memory, and a program stored in the memory and capable of running on the processor, and when the processor executes the program, the following steps are implemented:
receiving a plan task executable file distributed by a domain control server, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to a plan task to be executed and a related instruction, and the domain control server issues the plan task executable file to the server after detecting that the server is in a current domain;
analyzing the executable file of the plan task to obtain the extensible markup language file, the directory structure and the related instruction information for importing;
and importing the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
determining a plurality of servers for executing the to-be-issued planning tasks;
sequentially checking whether the plurality of servers are in the current domain;
when the plurality of servers are determined to be in the current domain, acquiring a plan task executable file corresponding to the to-be-issued plan task, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to the to-be-issued plan task and importing related instruction information;
distributing the plan task executable file to the plurality of servers so that the servers can import the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
In an embodiment of the present application, the obtaining, when it is determined that the servers are in the current domain, a plan task executable file corresponding to the plan task to be issued includes:
acquiring an extensible markup language file and a directory structure corresponding to the to-be-issued planned task from a template server configured with the to-be-issued planned task;
and encapsulating the extensible markup language file corresponding to the to-be-issued planning task, the directory structure and the import related instruction information into the executable file of the planning task.
In an embodiment of the present application, the obtaining, when it is determined that the servers are in the current domain, a plan task executable file corresponding to the plan task to be issued includes:
and acquiring the executable file of the plan task from the template server configured with the plan task to be issued, wherein the executable file of the plan task is obtained by encapsulating the extensible markup language file, the directory structure and the related instruction importing information by the template server.
In an embodiment of the present application, said sequentially checking whether the plurality of servers are in the current domain includes:
acquiring a computer name of the server;
judging whether the computer name of the server contains the domain name of the current domain or not;
when the computer name contains the domain name of the current domain, determining that the server is in the current domain;
and when the domain name of the current domain is not contained in the computer name, determining that the server is not in the current domain.
In one embodiment of the present application, the method further comprises: and when the server is not in the current domain, adding the server into the current domain.
In one embodiment of the present application, distributing the planned task executable to the plurality of servers includes:
adding a group policy on the domain control server;
and respectively sending the plan task executable files to the plurality of servers according to the group strategy.
In another aspect, the present application provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
receiving a plan task executable file distributed by a domain control server, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to a plan task to be executed and a related instruction, and the domain control server issues the plan task executable file to the server after detecting that the server is in a current domain;
analyzing the executable file of the plan task to obtain the extensible markup language file, the directory structure and the related instruction information for importing;
and importing the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (13)

1. A method for distributing a plan task is applied to a domain control server, and is characterized by comprising the following steps: determining a plurality of servers for executing the to-be-issued planning tasks;
sequentially checking whether the plurality of servers are in the current domain;
when the plurality of servers are determined to be in the current domain, acquiring a plan task executable file corresponding to the to-be-issued plan task, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to the to-be-issued plan task and importing related instruction information;
distributing the plan task executable file to the plurality of servers so that the servers can import the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
2. The method of claim 1, wherein obtaining a scheduled task executable corresponding to the scheduled task to be delivered when the plurality of servers are determined to be in the current domain comprises:
acquiring an extensible markup language file and a directory structure corresponding to the to-be-issued planned task from a template server configured with the to-be-issued planned task;
acquiring import related instruction information;
and encapsulating the extensible markup language file corresponding to the to-be-issued planning task, the directory structure and the import related instruction information into the executable file of the planning task.
3. The method of claim 1, wherein obtaining a scheduled task executable corresponding to the scheduled task to be delivered when the plurality of servers are determined to be in the current domain comprises:
and acquiring the executable file of the plan task from the template server configured with the plan task to be issued, wherein the executable file of the plan task is obtained by encapsulating the extensible markup language file, the directory structure and the related instruction importing information by the template server.
4. The method of claim 1, wherein said sequentially checking whether the plurality of servers are within a current domain comprises:
acquiring a computer name of the server;
judging whether the computer name of the server contains the domain name of the current domain or not;
when the computer name contains the domain name of the current domain, determining that the server is in the current domain;
and when the domain name of the current domain is not contained in the computer name, determining that the server is not in the current domain.
5. The method according to any one of claims 1-4, further comprising: and when the server is not in the current domain, adding the server into the current domain.
6. The method of claim 1, wherein distributing the planned task executable to the plurality of servers comprises:
adding a group policy on the domain control server;
and respectively sending the plan task executable files to the plurality of servers according to the group strategy.
7. A method for importing a planned task, which is applied to a server for executing the planned task, is characterized by comprising the following steps:
receiving a plan task executable file distributed by a domain control server, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to a plan task to be executed and related instruction information, and the domain control server issues the plan task executable file to the server after detecting that the server is in the current domain;
analyzing the executable file of the plan task to obtain the extensible markup language file, the directory structure and the related instruction information for importing;
and importing the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
8. A plan task distribution device applied to a domain control server is characterized by comprising:
the determining module is used for determining a plurality of servers for executing the to-be-issued planning tasks;
the checking module is used for checking whether the plurality of servers are in the current domain in sequence;
the acquisition module is used for acquiring a plan task executable file corresponding to the plan task to be issued when the plurality of servers are determined to be in the current domain, and the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to the plan task to be issued and related instruction information;
and the distribution module is used for distributing the executable file of the planned task to the plurality of servers so that the servers can import the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
9. A scheduled task importing device applied to a server for executing a scheduled task, comprising:
the receiving module is used for receiving a plan task executable file distributed by a domain control server, wherein the plan task executable file is obtained according to an extensible markup language file and a directory structure corresponding to a plan task to be executed and related instruction information, and the domain control server detects that the server is in a current domain and then issues the server;
the analysis module is used for analyzing the plan task executable file to obtain the extensible markup language file, the directory structure and the related instruction importing information;
and the import module is used for importing the extensible markup language file and the directory structure to a specified position according to the import related instruction information.
10. A storage medium on which a program is stored, the program realizing the scheduled task distributing method according to any one of claims 1 to 6 when executed by a processor.
11. A processor for executing a program, wherein the program executes to perform the method of distributing the planned tasks according to any one of claims 1 to 6.
12. A storage medium having a program stored thereon, wherein the program, when executed by a processor, implements the planned task import method of claim 7.
13. A processor for executing a program, wherein the program executes to perform the method of claim 7.
CN201710940156.1A 2017-09-30 2017-09-30 Method and device for distributing and importing planning tasks Active CN109614159B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710940156.1A CN109614159B (en) 2017-09-30 2017-09-30 Method and device for distributing and importing planning tasks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710940156.1A CN109614159B (en) 2017-09-30 2017-09-30 Method and device for distributing and importing planning tasks

Publications (2)

Publication Number Publication Date
CN109614159A CN109614159A (en) 2019-04-12
CN109614159B true CN109614159B (en) 2022-01-28

Family

ID=66002442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710940156.1A Active CN109614159B (en) 2017-09-30 2017-09-30 Method and device for distributing and importing planning tasks

Country Status (1)

Country Link
CN (1) CN109614159B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737636B (en) * 2019-09-24 2022-07-22 厦门信息集团大数据运营有限公司 Data import method, device and equipment
CN112785134B (en) * 2021-01-14 2023-03-24 上海发那科机器人有限公司 Production plan management system and method for butt joint robot spraying operation
CN113656347B (en) * 2021-08-17 2023-12-05 成都统信软件技术有限公司 File directory export method, file directory import method and computing device
CN114039852A (en) * 2021-10-26 2022-02-11 深圳毅芯半导体有限公司 Method, system and device for regularly executing plan by equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741730A (en) * 2009-12-02 2010-06-16 成都市华为赛门铁克科技有限公司 Method and equipment for downloading file and method and system for providing file downloading service
CN102082802A (en) * 2011-03-01 2011-06-01 陈彪 Behavior-based mobile terminal security protection system and method
CN102970284A (en) * 2012-11-05 2013-03-13 北京奇虎科技有限公司 User information processing method and server
CN106973080A (en) * 2017-02-20 2017-07-21 绿网天下(福建)网络科技股份有限公司 A kind of big document distribution method of LAN and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9747137B2 (en) * 2014-09-25 2017-08-29 Oracle International Corporation System and method for providing a partition file system in a multitenant application server environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741730A (en) * 2009-12-02 2010-06-16 成都市华为赛门铁克科技有限公司 Method and equipment for downloading file and method and system for providing file downloading service
CN102082802A (en) * 2011-03-01 2011-06-01 陈彪 Behavior-based mobile terminal security protection system and method
CN102970284A (en) * 2012-11-05 2013-03-13 北京奇虎科技有限公司 User information processing method and server
CN106973080A (en) * 2017-02-20 2017-07-21 绿网天下(福建)网络科技股份有限公司 A kind of big document distribution method of LAN and system

Also Published As

Publication number Publication date
CN109614159A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN109614159B (en) Method and device for distributing and importing planning tasks
CN114253793A (en) Dynamic tracking control
CN110147240B (en) Cloud storage-based application program installation method, system and storage medium
US9535754B1 (en) Dynamic provisioning of computing resources
CN108255708B (en) Method, device, storage medium and equipment for accessing production file in test environment
CN111596927B (en) Service deployment method and device and electronic equipment
EP2926238A1 (en) Running agents to execute automation tasks in cloud systems
CN111124871A (en) Interface test method and device
CN110677453A (en) ZooKeeper-based distributed lock service implementation method, device, equipment and storage medium
CN103152391A (en) Journal output method and device
CN110971646A (en) Cluster control device, system and method
CN114546592A (en) Model deployment evaluation method, server, electronic device and storage medium
CN112579099A (en) Code deployment method and device, storage medium and electronic equipment
CN108228197B (en) Method and device for installing software in cluster
CN111026080A (en) Hardware-in-loop test method and device for controller
US20200310828A1 (en) Method, function manager and arrangement for handling function calls
CN113312168A (en) Page access method and electronic equipment
CN109597627A (en) A kind of component mounting method, device, storage medium and processor
CN107621946B (en) Software development method, device and system
CN114006815A (en) Automatic deployment method and device for cloud platform nodes, nodes and storage medium
CN112230930A (en) Method and device for constructing and packaging hybrid technology stack and machine-readable storage medium
CN109660575B (en) Method and device for realizing NFV service deployment
CN112445504A (en) Equipment firmware upgrading method, device and system
CN112559118A (en) Application data migration method and device, electronic equipment and storage medium
Liu et al. Automatic cloud service testing and bottleneck detection system with scaling recommendation

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

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant