Questions about a possible batch file replacement in a Windows application?

I have a large legacy Windows application consisting of many executable files interacting with a database. Executable files have 4 main goals:

(a) parsing and loading a file in a database

(b) convert the file (for example, encode the file.) It can also split the file into many parts.

(c) perform some complex updates to the database

(d) create a file

These executables are called by batch files, which can be of three types depending on what they do:

(1) Wait for the conditions, get the file from some external path, maybe convert it with (b), do (c), send notifications about the result of activity, write an entry in the database

(2) Wait for the condition, do some (c), create a file, convert it using (b), and then copy it to one or more destinations (local file, database, ftp), send notifications about the results of activity, write a record to the database.

(3) Coordination of other complex sequences of executable files (abcd), sending notifications of the result of activity, writing a record to the database

Batch files are ordinary BAT files on a Windows computer (calling each other). Files are launched by the scheduler.

Problems:

- In each batch file, most of the environmental information (shared directories, etc.) is duplicated, and most files of type (1) or (2) are very similar.

- Batch files are not easily configured for the test environment, and they are easily checked automatically

- es ( errorA b, b c, d e).

- goto

- ,

- , , .

- , .

- (, , , ) (?) .

:

  • , - , , .

  • .

:

  • Java, ( , , .

  • Java "", . ( , , .)

  • jar.

    /li >
  • script


Java, (PHP, Python), - , " error" .

, ( 1 2), , , 3. , , , , - - ( , , - ) , .

, 100% " ".

:

, ? ?

, ? -, ? <

- ?

- , ?

, , , ?

, , , , , , .

+3
4

, , 100+.cmd , OSQL. , , . , , , , , / script . , Job Scheduler. , . : Zena JobScheduler. .

+1

PowerShell.

-, . PowerShell , , PowerShell . , Powershell , , Windows 7 Windows 2008 ISE ( ), .

, .NET CmdLets () Powershell script.

, , , , .

PowerShell .NET, Microsoft BizTalk, , -.

.

Powershell
http://pshscripts.blogspot.com/


http://en.wikipedia.org/wiki/Windows_PowerShell

+3

, .NET..NET , , . , , #, , , PowerShell Python.

0

Quartz (http://www.quartz-scheduler.org/). , , Java, . DB2. 2 , . Java-, , .

0

Source: https://habr.com/ru/post/1712077/


All Articles