CN103645898A - Automatic scripting tool - Google Patents

Automatic scripting tool Download PDF

Info

Publication number
CN103645898A
CN103645898A CN201310678164.5A CN201310678164A CN103645898A CN 103645898 A CN103645898 A CN 103645898A CN 201310678164 A CN201310678164 A CN 201310678164A CN 103645898 A CN103645898 A CN 103645898A
Authority
CN
China
Prior art keywords
list
state
script
processes
finish
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.)
Granted
Application number
CN201310678164.5A
Other languages
Chinese (zh)
Other versions
CN103645898B (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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201310678164.5A priority Critical patent/CN103645898B/en
Publication of CN103645898A publication Critical patent/CN103645898A/en
Application granted granted Critical
Publication of CN103645898B publication Critical patent/CN103645898B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides an automatic scripting tool. Customization of dependence is realized through presetting of dependence relationships, correlated processes are started automatically in a starting sequence satisfying requirements for applications, functions and the like, whether starting of each phase is normal or not is detected automatically, if the starting of each phase is normal, the next process is started according to a sequence preset by a user, and the started processes, the process quantity and mutual relationships can be preset according to requirements of the user. According to the scripting tool, the correlated processes can also be ended automatically in an ending sequence satisfying the requirements for the applications, the functions and the like, whether ending of each phase is successful or not is detected automatically, and if the ending of each phase is successful, the next process is ended according to a sequence preset by the user. Compared with the prior art, the automatic scripting tool has the advantages of high practicability, higher automatic completion efficiency and easiness in popularization.

Description

A kind of automatized script instrument
Technical field
The present invention relates to server computing application and administrative skill field, specifically a kind of automatized script instrument.
Background technology
Different according to applied environment on server, can start different process.In a large amount of processes, can exist independent separately, boot sequence, each process not affecting of end order, also exist boot sequence and end order interrelated, some process need to just can normally start after other processes have started, some process need to just can normally close after other processes have started simultaneously.Common practices, is when coding, to consider the interdependence of process, and needs at code layer, to carry out design and corresponding realization in advance.The process that conventional method cannot not have the executable file of source code to produce for some is carried out interrelated, and when actual application environment and demand generation change, need to again do a large amount of designs and coding work at code layer.
On server, generally adopting multiprocessor and every processor is at present all a plurality of physics cores, it is even more that the process number that separate unit server can carry can reach processes up to a hundred, if applied environment changes, according to conventional method, need again at code layer, to modify, workload is heavy, if operation manually, workload can be quite large, and manually operated human error also can increase.
Therefore, provide that customizable relies on, easy-to-use, the wscript.exe of simplifying manual operation, just seem and be of practical significance very much.
Summary of the invention
Technical assignment of the present invention is to solve the deficiencies in the prior art, and a kind of automatized script instrument is provided.
Technical scheme of the present invention realizes in the following manner, this kind of automatized script instrument, and implementation step is:
1) script obtains current time stamp when operation, reads user preset dependence and stand-by period w;
2) take process name and add timestamp as name, create journal file, and make file in appending the state writing;
3) to move the mode of subprocess, start the current process in list and return to immediately script;
4) after stand-by period w, detecting step 3), started state of a process, state can be: operation or off-duty;
5) 4) if in the state that detects be off-duty, point out and exit script; If the state detecting is operation, to next process in default process list, the mode with operation subprocess starts process and returns to immediately script;
6) repeating step 3)~5), until all processes in the presets list are all activated;
7) read process in user preset dependence and finish list;
8) continue the current process state in detection list, until state is off-duty;
9) according to the order that finishes list, finish next process, and continue to detect the process status of end operation effect, until state is off-duty;
10) repeating step 9), until all processes that finish in list are all moved to end.
In described step 1), preset dependence and comprise that a process initiation list and process finish list, wherein
Process initiation list is to comprise the process name that all needs start, by the sequencing of required startup, arranges, and former and later two adjacent processes, a rear process depends on previous process and starts, and in normal operation;
It is to comprise the process name that all needs start that process finishes list, by the sequencing of required end, arrange, and former and later two adjacent processes, a rear process depends on previous process and finishes.
Stand-by period in described step 1) starts completely for waiting process, and this time is greater than the maximal value of maximum start-up time and maximum end time in process list.
The beneficial effect that the present invention compared with prior art produced is:
A kind of automatized script instrument of the present invention, by the presetting of dependence, is realized the customizable relying on, thereby when change occurs for actual application environment and demand, changes fast, meets new demand.Do not need again code layer to be designed and changed.Practical, applied widely, be easy to promote.
Embodiment
Below a kind of automatized script instrument of the present invention is described in detail below.
The present invention is by designing a wscript.exe, for automatic phasing mutual correlation process, according to the boot sequence that meets the demands such as application, function, start, whether and it is normal automatically to detect per stage startup, as normally, by the order of presetting according to user, start next process, as certain one-phase finishes after starting unsuccessfully or starting fast, to provide prompting, as follow-up phase all relies on normal startup and the work of this stage process, script is by prompting and exit.The process, process number and the mutual relationship that start can be preset according to user's demand.Wscript.exe can automatic phasing mutual correlation process sequentially finish according to the end that meets the demands such as application, function equally, and automatically detect per stage and finish whether success, as success, by the order of presetting according to user, finish next process, as certain one-phase, to finish process unsuccessful, will provide prompting, as follow-up phase all relies on the end of this stage process, script is by prompting and exit.The specific implementation step of wscript.exe provided by the invention is:
1) script obtains current time stamp when operation, reads user preset dependence and stand-by period w.
By system function, directly obtain timestamp, if do not supported direct acquisition, current time calculates current time stamp, read in the predefined process initiation list of user, and current operation process is set to the first process of process initiation list.
2) take process name and add timestamp as name, create journal file, and make file in appending the state writing.
3) to move the mode of subprocess, start the current process in list and return to immediately script.Mode with operation subprocess starts current process, and unblock mode is used in operation, can return to immediately script like this after operation.
4) after stand-by period w, detecting step 3), started state of a process, state can be: operation or off-duty; By default, after stand-by period w, detect in (3) and started state of a process.
5) if the state detecting is off-duty, point out and exit script in step 4); If the state detecting is operation, to next process in default process list, the mode with operation subprocess starts process and returns to immediately script; As the state detecting is for moving, and next process in default process list is started process and returns to immediately script to move the mode of subprocess.
6) repeating step 3)~5), until all processes in the presets list are all activated, with the process in the mode that circulates successively operating list, when circulation finishes, all processes are all activated or wrong returning.
7) read process in user preset dependence and finish list.
8) continue the current process state in detection list, until state is off-duty, continues to detect and use obstruction mode to operate, do not return immediately, until the state detecting is off-duty, just return to script.
9) according to the order that finishes list, finish next process, and continue to detect the process status of end operation effect, until state is off-duty.
10) repeating step 9), until all processes that finish in list are all moved to end.Closing journal file afterwards, script finishes.
In described step 1), preset dependence and comprise that a process initiation list and process finish list, wherein
Process initiation list is to comprise the process name that all needs start, by the sequencing of required startup, arranges, and former and later two adjacent processes, a rear process depends on previous process and starts, and in normal operation.
It is to comprise the process name that all needs start that process finishes list, by the sequencing of required end, arrange, and former and later two adjacent processes, a rear process depends on previous process and finishes.
Stand-by period in described step 1) starts completely for waiting process, and this time is greater than the maximal value of maximum start-up time and maximum end time in process list.
The present invention is the automatized script instrument for interrelated process initiation and end, it is the process that can be used for automatically opening and finishing to have relation of interdependence, as two process A, B, process A need to start prior to process B, and the normal need of work of process B guarantees that A has started and normally operation, the present invention can arrange after the boot sequence and dependence of process A and process B user, according to preset order, start, and meeting self-verifying process status, to determine whether default dependence meets, assurance process A, B all can be by pre-conditioned, normal work.The present invention is not only applicable to two interrelated processes, is equally applicable to a plurality of processes that are mutually related.
Automatized script instrument feature of the present invention is can the process in arbitrarily default dependence be started and be finished by its dependence, can customize arbitrarily, operation automation
The foregoing is only embodiments of the invention, within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (3)

1. an automatized script instrument, is characterized in that implementation step is:
1) script obtains current time stamp when operation, reads user preset dependence and stand-by period w;
2) take process name and add timestamp as name, create journal file, and make file in appending the state writing;
3) to move the mode of subprocess, start the current process in list and return to immediately script;
4) after stand-by period w, detecting step 3), started state of a process, state can be: operation or off-duty;
5) 4) if in the state that detects be off-duty, point out and exit script; If the state detecting is operation, to next process in default process list, the mode with operation subprocess starts process and returns to immediately script;
6) repeating step 3)~5), until all processes in the presets list are all activated;
7) read process in user preset dependence and finish list;
8) continue the current process state in detection list, until state is off-duty;
9) according to the order that finishes list, finish next process, and continue to detect the process status of end operation effect, until state is off-duty;
10) repeating step 9), until all processes that finish in list are all moved to end.
2. a kind of automatized script instrument according to claim 1, is characterized in that: in described step 1), preset dependence and comprise that a process initiation list and process finish list, wherein
Process initiation list is to comprise the process name that all needs start, by the sequencing of required startup, arranges, and former and later two adjacent processes, a rear process depends on previous process and starts, and in normal operation;
It is to comprise the process name that all needs start that process finishes list, by the sequencing of required end, arrange, and former and later two adjacent processes, a rear process depends on previous process and finishes.
3. a kind of automatized script instrument according to claim 2, is characterized in that: the stand-by period in described step 1) starts completely for waiting process, and this time is greater than the maximal value of maximum start-up time and maximum end time in process list.
CN201310678164.5A 2013-12-13 2013-12-13 Automatic scripting tool Active CN103645898B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310678164.5A CN103645898B (en) 2013-12-13 2013-12-13 Automatic scripting tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310678164.5A CN103645898B (en) 2013-12-13 2013-12-13 Automatic scripting tool

Publications (2)

Publication Number Publication Date
CN103645898A true CN103645898A (en) 2014-03-19
CN103645898B CN103645898B (en) 2017-04-12

Family

ID=50251122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310678164.5A Active CN103645898B (en) 2013-12-13 2013-12-13 Automatic scripting tool

Country Status (1)

Country Link
CN (1) CN103645898B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138380A (en) * 2015-09-21 2015-12-09 天脉聚源(北京)传媒科技有限公司 Method and device for starting Linux system
CN106325871A (en) * 2016-08-25 2017-01-11 乐视控股(北京)有限公司 Maintenance method and device for server
CN107392575A (en) * 2017-07-12 2017-11-24 北京奇安信科技有限公司 A kind of automated payment method and device
CN110764883A (en) * 2018-07-26 2020-02-07 浙江宇视科技有限公司 Start-stop control method and device for service group
CN111176751A (en) * 2019-12-18 2020-05-19 南京巨鲨显示科技有限公司 Method and system for completely closing application software
CN111722886A (en) * 2020-06-23 2020-09-29 平安医疗健康管理股份有限公司 Tool starting method and device, computer equipment and computer readable storage medium
CN111984377A (en) * 2020-09-23 2020-11-24 成都精灵云科技有限公司 Application arrangement system supporting dependency relationship management and method thereof
CN115277679A (en) * 2022-07-29 2022-11-01 山石网科通信技术股份有限公司 File synchronization method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1521990A (en) * 2003-01-28 2004-08-18 华为技术有限公司 Fully dynamic distributed network service management system and service method thereof
US20050192974A1 (en) * 2004-02-12 2005-09-01 International Business Machines Corporation Method of converting a filesystem while the filesystem remains in an active state
US20080140829A1 (en) * 2005-02-11 2008-06-12 Michel Berbiguier Test Flight On-Board Processing System And Method
CN101625647A (en) * 2009-08-06 2010-01-13 青岛海信电器股份有限公司 Method for accelerating starting speed of embedded software system
CN101834890A (en) * 2010-04-02 2010-09-15 浪潮(北京)电子信息产业有限公司 Intelligent management system and method of distributed system
CN102521099A (en) * 2011-11-24 2012-06-27 深圳市同洲视讯传媒有限公司 Process monitoring method and process monitoring system
CN103309769A (en) * 2011-06-20 2013-09-18 北京奇虎科技有限公司 Operation system starting protection method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1521990A (en) * 2003-01-28 2004-08-18 华为技术有限公司 Fully dynamic distributed network service management system and service method thereof
US20050192974A1 (en) * 2004-02-12 2005-09-01 International Business Machines Corporation Method of converting a filesystem while the filesystem remains in an active state
US20080140829A1 (en) * 2005-02-11 2008-06-12 Michel Berbiguier Test Flight On-Board Processing System And Method
CN101625647A (en) * 2009-08-06 2010-01-13 青岛海信电器股份有限公司 Method for accelerating starting speed of embedded software system
CN101834890A (en) * 2010-04-02 2010-09-15 浪潮(北京)电子信息产业有限公司 Intelligent management system and method of distributed system
CN103309769A (en) * 2011-06-20 2013-09-18 北京奇虎科技有限公司 Operation system starting protection method and device
CN102521099A (en) * 2011-11-24 2012-06-27 深圳市同洲视讯传媒有限公司 Process monitoring method and process monitoring system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138380A (en) * 2015-09-21 2015-12-09 天脉聚源(北京)传媒科技有限公司 Method and device for starting Linux system
CN105138380B (en) * 2015-09-21 2018-06-19 天脉聚源(北京)传媒科技有限公司 A kind of startup method and device of linux system
CN106325871A (en) * 2016-08-25 2017-01-11 乐视控股(北京)有限公司 Maintenance method and device for server
CN107392575A (en) * 2017-07-12 2017-11-24 北京奇安信科技有限公司 A kind of automated payment method and device
CN110764883A (en) * 2018-07-26 2020-02-07 浙江宇视科技有限公司 Start-stop control method and device for service group
CN110764883B (en) * 2018-07-26 2022-08-23 浙江宇视科技有限公司 Start-stop control method and device for service group
CN111176751A (en) * 2019-12-18 2020-05-19 南京巨鲨显示科技有限公司 Method and system for completely closing application software
CN111722886A (en) * 2020-06-23 2020-09-29 平安医疗健康管理股份有限公司 Tool starting method and device, computer equipment and computer readable storage medium
CN111984377A (en) * 2020-09-23 2020-11-24 成都精灵云科技有限公司 Application arrangement system supporting dependency relationship management and method thereof
CN115277679A (en) * 2022-07-29 2022-11-01 山石网科通信技术股份有限公司 File synchronization method and system
CN115277679B (en) * 2022-07-29 2024-04-12 山石网科通信技术股份有限公司 File synchronization method and system

Also Published As

Publication number Publication date
CN103645898B (en) 2017-04-12

Similar Documents

Publication Publication Date Title
CN103645898A (en) Automatic scripting tool
RU2016145668A (en) CONFIGURATION OF WORKING PROCESSES IN THE LEADING DEVICE WORKING IN THE SYSTEM OF MANAGEMENT OF TECHNOLOGICAL PROCESSES
CN102968217A (en) Reference updating method and system for touch screen as well as touch terminal
WO2003069470A1 (en) Application creation system, creation apparatus, creation method, application providing system, providing apparatus, providing method, application operation system, operation apparatus, and operation method
CN103777947A (en) Method and device for managing main interface of mobile terminal
CN104536711A (en) Control method of terminal display
CN104866406B (en) A kind of reminding method and terminal based on fingerprint recognition
CN103019794A (en) Off-line batching programming method of multiple embedded program files
CN110764978A (en) Hard disk lighting method and device, electronic equipment and storage medium
CN104580705A (en) Terminal
CN105260722B (en) Fingerprint identification method and device, and mobile terminal
CN111158246A (en) Intelligent household appliance control system, device, method, medium and equipment
CN104808982A (en) Application function simulation development method and device
TWI764035B (en) Interactive control device and interactive control method
CN108845825B (en) Storage system configuration method, device, equipment and readable storage medium
CN106325693A (en) Terminal control method and device, and the terminal
CN103677845A (en) Website application deployment method
CN105205123B (en) Data interactive method and device between a kind of database
CN101241437A (en) Method for selecting operating system to be started through basic input output system
CN107450953A (en) A kind of renewal BIOS method and device
CN107037294A (en) The detection method and detecting system of a kind of host computer, frequency conversion integrated board
CN103677819A (en) Method and device for achieving code forward engineering based on OSGI
CN102779059A (en) Method and device for starting application at Saipan client sides
WO2015180504A1 (en) A method, device, and system for flow process error control
CN111159271A (en) Data processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20180815

Address after: 250101 S06 tower, 1036, Chao Lu Road, hi tech Zone, Ji'nan, Shandong.

Patentee after: Shandong wave cloud Mdt InfoTech Ltd

Address before: 250014 1036 Shun Ya Road, hi tech Zone, Ji'nan, Shandong.

Patentee before: Langchao Electronic Information Industry Co., Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee after: Inspur cloud Information Technology Co., Ltd

Address before: 250101 S06 tower, 1036, Chao Lu Road, hi tech Zone, Ji'nan, Shandong.

Patentee before: SHANDONG LANGCHAO YUNTOU INFORMATION TECHNOLOGY Co.,Ltd.