CN103645898B - Automatic scripting tool - Google Patents

Automatic scripting tool Download PDF

Info

Publication number
CN103645898B
CN103645898B CN201310678164.5A CN201310678164A CN103645898B CN 103645898 B CN103645898 B CN 103645898B CN 201310678164 A CN201310678164 A CN 201310678164A CN 103645898 B CN103645898 B CN 103645898B
Authority
CN
China
Prior art keywords
list
state
processes
script
terminate
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
CN201310678164.5A
Other languages
Chinese (zh)
Other versions
CN103645898A (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 calculates application and administrative skill field, specifically a kind of automatized script instrument.
Background technology
It is different according to applied environment on the server, different process can be started.Can exist each in a large amount of processes It is independent, the process that boot sequence, end order respectively do not affect, while there is also boot sequence and end order is interrelated, i.e., Some processes needs just can normally start after other processes have been started up finishing, some processes are needed in other processes It is activated finish after just can normal switching-off.Common practices, is that the interdependence of process is considered in coding, and is needed pre- First carry out design and corresponding realization in code layer.Conventional method cannot for some do not have source code executable file produce enter Cheng Jinhang is interrelated, and when actual application environment and demand are changed, needs do substantial amounts of setting again in code layer Meter and coding work.
Generally it is at present multiple physical cores using multiprocessor and per processor on server, single server institute energy To can reach processes up to a hundred even more more for the number of passes that enters for carrying, if applied environment changes, according to conventional method needs again Modify in code layer, workload is heavy, if manual hand manipulation, the artificial mistake that workload can be quite big, manually operated Mistake also can increase.
Therefore it provides customizable dependence, wscript.exe that is easy-to-use, simplifying manual operation, just seem there is very much actual meaning Justice.
The content of the invention
The technical assignment of the present invention is to solve the deficiencies in the prior art, there is provided a kind of automatized script instrument.
The technical scheme is that what is realized in the following manner, a kind of automatized script instrument, implementation step is:
1)Script operationally obtains current time stamp, reads user preset dependence and stand-by period w;
2)Added timestamp as name with process name, create journal file, and make state of the file in write can be added;
3)Start the current process in list in the way of to run subprocess and return script immediately;
4)After stand-by period w, detecting step 3) in have been turned on state of a process, state can be:Operation or off-duty;
5)4)In if the state for detecting be off-duty, then pointed out and exited script;If the shape for detecting State is operation, then to next process in default process list to run subprocess in the way of launching process and return pin immediately This;
6)Repeat step 3)~5), all processes in the presets list are activated;
7)Read process in user preset dependence and terminate list;
8)The current process state in list is persistently detected, until state is off-duty;
9)According to the order for terminating list, terminate next process, and persistently detect the process status that end operation is acted on, Until state is off-duty;
10)Repeat step 9), until terminate list in all processes be moved to end.
The step 1)In preset dependence and terminate list including a process initiation list and process, wherein
Process initiation list is the process name comprising institute's startup in need, by the sequencing arrangement of required startup, and phase Former and later two adjacent processes, latter process depends on previous process to have been started up, and is normally running;
It is the process name comprising institute's end in need that process terminates list, by the sequencing arrangement of required end, and phase Former and later two adjacent processes, latter process depends on previous process to be over.
The step 1)In stand-by period start completely for waiting process, the time opens more than maximum in process list Dynamic time and the maximum of maximum end time.
The produced compared with prior art beneficial effect of the present invention is:
A kind of automatized script instrument of the present invention realizes the customizable of dependence by presetting to dependence Change, so as to when actual application environment and demand are changed, quickly be changed, meet new demand.Need not be again to generation Code layer is designed and changes.It is practical, it is applied widely, it is easy to promote.
Specific embodiment
A kind of automatized script instrument of the present invention is described in detail below below.
The present invention is by designing a wscript.exe, for automatic phasing mutual correlation process according to satisfaction application, function Started etc. the boot sequence of demand, and normally whether automatic detection start per the stage, it is such as normal, will preset according to user Order, start next process, the such as a certain stage starts failure or quickly terminates after starting, will be given and point out and exit.Open Dynamic process, enter number of passes and correlation and can be preset according to the demand of user.Wscript.exe equally can automatic phasing it is mutual Association process is terminated according to application, the end of the demand such as function order is met, and automatic detection per the stage terminate whether into Work(, such as success, will terminate next process according to the default order of user, and such as to terminate process unsuccessful a certain stage, will give Go out prompting, such as follow-up phase all relies on the end of this stage process, and script will be prompted to and exit.The wscript.exe that the present invention is provided The step that implements be:
1)Script operationally obtains current time stamp, reads user preset dependence and stand-by period w.
Timestamp is directly obtained by system function, if do not supported to directly obtain, current time carries out being calculated currently Timestamp, reads in user's process initiation list set in advance, and current operation process is set to into the head of process initiation list Individual process.
2)Added timestamp as name with process name, create journal file, and make state of the file in write can be added.
3)Start the current process in list in the way of to run subprocess and return script immediately.To run subprocess Mode starts current process, operates with non-blocking fashion, and after so operating script can be immediately returned.
4)After stand-by period w, detecting step 3) in have been turned on state of a process, state can be:Operation or off-duty;By pre- If after stand-by period w, in detection (3) state of a process is had been turned on.
5)In step 4)In if the state for detecting be off-duty, then pointed out and exited script;If detected State be operation, then to next process in default process list to run subprocess in the way of launching process and return immediately Bend backwards sheet;The state for such as detecting is operation, then to next process in default process list to run subprocess in the way of Launching process simultaneously returns immediately script.
6)Repeat step 3)~5), all processes in the presets list are activated, grasp successively in a circulating manner Make the process in list, at the end of circulation, all processes are activated or wrong return.
7)Read process in user preset dependence and terminate list.
8)The current process state in list is persistently detected, until state is off-duty, persistently detection uses obstruction mode Operation, does not return immediately, until the state for detecting just returns script for off-duty.
9)According to the order for terminating list, terminate next process, and persistently detect the process status that end operation is acted on, Until state is off-duty.
10)Repeat step 9), until terminate list in all processes be moved to end.Closing journal file afterwards, script Terminate.
The step 1)In preset dependence and terminate list including a process initiation list and process, wherein
Process initiation list is the process name comprising institute's startup in need, by the sequencing arrangement of required startup, and phase Former and later two adjacent processes, latter process depends on previous process to have been started up, and is normally running.
It is the process name comprising institute's end in need that process terminates list, by the sequencing arrangement of required end, and phase Former and later two adjacent processes, latter process depends on previous process to be over.
The step 1)In stand-by period start completely for waiting process, the time opens more than maximum in process list Dynamic time and the maximum of maximum end time.
The present invention is the automatized script instrument for interrelated process initiation and end, be can be used to automatically turning on and Terminate the process with relation of interdependence, such as two processes A, B, process A needs to start prior to process B, and process B is just Often need of work ensures that A has been started up and normally runs, and the present invention can arrange the boot sequence of process A and process B in user After dependence, started according to preset order, and can automatically be checked process status, whether to determine default dependence Meet, it is ensured that process A, B can be by pre-conditioned, normal work.The present invention is applicable not only to two interrelated processes, equally Suitable for multiple processes that are mutually related.
The automatized script instrument feature of the present invention is that the process in any default dependence can be relied on by it Started and terminated, can arbitrarily be customized, operation automation
The foregoing is only embodiments of the invention, it is all within the spirit and principles in the present invention, made it is any Modification, equivalent, improvement etc., should be included within the scope of the present invention.

Claims (3)

1. a kind of automatized script instrument, it is characterised in that implementation step is:
1)Script operationally obtains current time stamp, reads user preset dependence and stand-by period w;
2)Added timestamp as name with process name, create journal file, and make state of the file in write can be added;
3)Start the current process in list in the way of to run subprocess and return script immediately;
4)After stand-by period w, detecting step 3) in have been turned on state of a process, state can be:Operation or off-duty;
5)4)In if the state for detecting be off-duty, then pointed out and exited script;If the state for detecting is Operation, then to next process in default process list to run subprocess in the way of launching process and return script immediately;
6)Repeat step 3)~5), all processes in the presets list are activated;
7)Read process in user preset dependence and terminate list;
8)The current process state in list is persistently detected, until state is off-duty;
9)According to the order for terminating list, terminate next process, and persistently detect the process status that end operation is acted on, until State is off-duty;
10)Repeat step 9), until terminate list in all processes be moved to end.
2. a kind of automatized script instrument according to claim 1, it is characterised in that:The step 1)In preset according to Bad relation includes that a process initiation list and process terminate list, wherein
Process initiation list is the process name comprising institute's startup in need, and adjacent by the sequencing arrangement of required startup Former and later two processes, latter process depends on previous process to have been started up, and is normally running;
It is the process name comprising institute's end in need that process terminates list, and adjacent by the sequencing arrangement of required end Former and later two processes, latter process depends on previous process to be over.
3. a kind of automatized script instrument according to claim 2, it is characterised in that:The step 1)In stand-by period Start completely for waiting process, maximum of the time more than maximum starting 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 CN103645898A (en) 2014-03-19
CN103645898B true 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)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN115277679B (en) * 2022-07-29 2024-04-12 山石网科通信技术股份有限公司 File synchronization method and system

Citations (5)

* 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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8667035B2 (en) * 2004-02-12 2014-03-04 International Business Machines Corporation Method of converting a filesystem while the filesystem remains in an active state
FR2882165B1 (en) * 2005-02-11 2007-06-29 Airbus France Sas SYSTEM AND METHOD FOR ONBOARD FLIGHT TEST PROCESSING

Patent Citations (5)

* 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
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

Also Published As

Publication number Publication date
CN103645898A (en) 2014-03-19

Similar Documents

Publication Publication Date Title
CN103645898B (en) Automatic scripting tool
JP2009123214A5 (en)
CN104422137A (en) Water heater appointment heating control method and system
CN106227572A (en) A kind of frequency converter control system programme upgrade method
RU2010111740A (en) SERVICE-ORIENTED ARCHITECTURE BASED ON A CONVEYOR
CN103679401A (en) Flow control method, server, client side and system
CN105162629A (en) Automatic implementation method for double-network-card binding under LINUX system
CN105155203A (en) Washing machine power consumption calculating method
CN103307704B (en) The main outer machine of air-conditioning one many machines indoor address distribution method
CN104573454A (en) Method for quickly starting applications of handheld intelligent terminal equipment by fingerprints
CN112305924B (en) Control method and device of household appliance, electronic equipment and storage medium
CN104820655B (en) CPU hot plug implementation method and system based on FPGA
CN104461679A (en) Automatic implementation method for binding network card to CPU
CN110378096A (en) A kind of consumable chip communication means, consumable chip and consumptive material
CN106896729A (en) The management method of family's group household electrical appliance, device and system
CN105204334A (en) Method for recognizing first-order model real-time parameters of building with air conditioner based on recursive least-squares method
CN105205123B (en) Data interactive method and device between a kind of database
CN209514596U (en) A kind of programming system of circuit board
CN108397913A (en) The Compliance control method, apparatus and system of central heater
WO2010145386A1 (en) File transfer protocol client and implementing method thereof
CN102833621B (en) User system management method based on smart television terminal
CN111123781B (en) Parameter correction control method, device, small household appliance and storage medium
WO2018068687A1 (en) Modification method for mobile terminal firmware
CN105243096B (en) A kind of XML file treating method and apparatus
CN102243593B (en) A kind of method based on RTP application program launchings under vxworks operating system

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

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.

TR01 Transfer of patent right
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.

CP03 Change of name, title or address