Browse DevX
Sign up for e-mail newsletters from DevX


Build an XML Based Scheduling Utility : Page 2

Complex applications often consist of many individual tasks, each of which may depend upon the successful completion of other tasks. For example, you may want an application to execute only if a preceding series of steps occur without failure, in a specific sequence. Managing such dependencies sequences manually quickly becomes a burden. Learn to automate process sequence dependencies with this XML-based scheduling utility.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Implement the XML based Scheduling Utility
You can model the process flow information shown in Tables 1 and 2 as an XML file conforming to the DTD contained in the job_stream.dtd file (see Listing 1). The job_stream.xml file (see Listing 2.) contains the XML representation of the process flow information for the sample Data Warehouse Application. The run_condition elements contain the subunit names (job_names) that must complete successfully for the job to run. For example, the Load_Tables job_box element's run_condition specifies (success(Drop_Index1) AND success(Drop_Index2)) or simply ((Drop_Index1) AND (Drop_Index2)). If a job has no dependencies on a previous job , specify none in the run_condition. Both AND and none are keywords and cannot be used as part of the name of a job_box.

The DOMScheduler.java file contains the source code for a simple XML based scheduling utility implemented using the Apache Xerces Java Parser 1.4.3 Release. It accepts an XML file as input, which must validate against the jobstream.dtd. You can use the current version of the scheduling utility to run a single job stream of programs. The programs themselves can be compiled executables of any kind, for example, Java applications, C/C++ executables, DOS batch programs etc. The scheduler calls the Runtime.exec() method (which in turn calls upon system level APIs like the Win32API CreateProcess()), which may not work well for special processes on certain native platforms such as Win16/DOS processes on Win32, or on shell scripts. The user must populate the XML file with all the unit and subunit information.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date