Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to download the binaries and to integrate them in your application , you need to it is required that you have Maven installed.

Maven

  • Check the Maven Documentation.
  • SOS uses Maven 3.2.1. Download the latest Maven release
  • Maven's /bin folder has to be added to the global variable "PATH" in order to take effect.
  • No further configuration is required for Maven in order to compile.  If further configuration is wantedFor indidividual  configuration, for example to receive certain 3rd Party libraries from an official a Maven2 repository, e.g. http://repo1.maven.org/maven2, then you have to configure the settings.xml file.

...

To get a minimal JobScheduler up and running, create a home folder, e.g. myJobScheduler, and copy the binaries according to your operating system as well as and the Java library to this folder.

Step 2

Add the following files to a folder:

  • 3rd Party libraries

...

  • that are configured in the jobscheduler.engine-1.9.6.pom file

...

  • .
  • the JDBC database driver you want to use.

 If If you copy the 3rd party libraries to a different folder then you have to configure the path in the add this folder to the class_path setting in the [java] section of the factory.ini file. 

Code Block
languagexml
titledependency snippet from the jobscheduler.engine-1.9.6-pom
collapsetrue
<dependencies>
	<dependency>
		<groupId>com.google.guava</groupId>
		<artifactId>guava</artifactId>
		<version>18.0</version>
	</dependency>
	<dependency>
		<groupId>javax.inject</groupId>
		<artifactId>javax.inject</artifactId>
		<version>1</version>
	</dependency>
	<dependency>
		<groupId>com.google.inject</groupId>
		<artifactId>guice</artifactId>
		<version>3.0</version>
	</dependency>
	<dependency>
		<groupId>com.h2database</groupId>
		<artifactId>h2</artifactId>
		<version>1.4.186</version>
	</dependency>
	<dependency>
		<groupId>commons-net</groupId>
		<artifactId>commons-net</artifactId>
		<version>3.3</version>
	</dependency>
	<dependency>
		<groupId>javax.mail</groupId>
		<artifactId>mail</artifactId>
		<version>1.4.7</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.persistence</groupId>
		<artifactId>javax.persistence</artifactId>
		<version>2.1.0</version>
	</dependency>
	<dependency>
		<groupId>org.scalactic</groupId>
		<artifactId>scalactic_2.11</artifactId>
		<version>2.2.4</version>
	</dependency>
	<dependency>
		<groupId>org.scala-lang</groupId>
		<artifactId>scala-library</artifactId>
		<version>2.11.6</version>
	</dependency>
	<dependency>
		<groupId>org.scala-lang</groupId>
		<artifactId>scala-reflect</artifactId>
		<version>2.11.6</version>
	</dependency>
	<dependency>
		<groupId>org.scala-lang.modules</groupId>
		<artifactId>scala-xml_2.11</artifactId>
		<version>1.0.3</version>
	</dependency>
	<dependency>
		<groupId>xerces</groupId>
		<artifactId>xercesImpl</artifactId>
		<version>2.11.0</version>
	</dependency>
	<dependency>
		<groupId>xml-apis</groupId>
		<artifactId>xml-apis</artifactId>
		<version>1.4.01</version>
	</dependency>
	<dependency>
		<groupId>joda-time</groupId>
		<artifactId>joda-time</artifactId>
		<version>2.5</version>
	</dependency>
	<dependency>
		<groupId>org.joda</groupId>
		<artifactId>joda-convert</artifactId>
		<version>1.7</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-server</artifactId>
		<version>8.1.16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-servlet</artifactId>
		<version>8.1.16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-servlets</artifactId>
		<version>8.1.16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-xml</artifactId>
		<version>8.1.16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-client</artifactId>
		<version>8.1.16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-webapp</artifactId>
		<version>8.1.16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-websocket</artifactId>
		<version>8.1.16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>com.sun.jersey</groupId>
		<artifactId>jersey-server</artifactId>
		<version>1.19</version>
	</dependency>
	<dependency>
		<groupId>com.sun.jersey.contribs</groupId>
		<artifactId>jersey-guice</artifactId>
		<version>1.19</version>
	</dependency>
	<dependency>
		<groupId>com.sun.jersey</groupId>
		<artifactId>jersey-client</artifactId>
		<version>1.19</version>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>1.7.10</version>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-log4j12</artifactId>
		<version>1.7.10</version>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>jul-to-slf4j</artifactId>
		<version>1.7.10</version>
	</dependency>
	<dependency>
		<groupId>log4j</groupId>
		<artifactId>log4j</artifactId>
		<version>1.2.16</version>
	</dependency>
	<dependency>
		<groupId>com.google.code.findbugs</groupId>
		<artifactId>jsr305</artifactId>
		<version>3.0.0</version>
	</dependency>
	<dependency>
		<groupId>javax.ws.rs</groupId>
		<artifactId>jsr311-api</artifactId>
		<version>1.1.1</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.core</groupId>
		<artifactId>jackson-core</artifactId>
		<version>2.4.3</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.core</groupId>
		<artifactId>jackson-databind</artifactId>
		<version>2.4.3</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.core</groupId>
		<artifactId>jackson-annotations</artifactId>
		<version>2.4.3</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.jaxrs</groupId>
		<artifactId>jackson-jaxrs-json-provider</artifactId>
		<version>2.4.3</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.datatype</groupId>
		<artifactId>jackson-datatype-guava</artifactId>
		<version>2.4.3</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.module</groupId>
		<artifactId>jackson-module-scala_2.11</artifactId>
		<version>2.4.3</version>
	</dependency>
	<dependency>
		<groupId>commons-beanutils</groupId>
		<artifactId>commons-beanutils</artifactId>
		<version>1.9.2</version>
	</dependency>
	<dependency>
		<groupId>io.spray</groupId>
		<artifactId>spray-json_2.11</artifactId>
		<version>1.3.1</version>
	</dependency>
	<dependency>
		<groupId>io.spray</groupId>
		<artifactId>spray-http_2.11</artifactId>
		<version>1.3.2</version>
	</dependency>
	<dependency>
		<groupId>io.spray</groupId>
		<artifactId>spray-client_2.11</artifactId>
		<version>1.3.2</version>
	</dependency>
	<dependency>
		<groupId>com.typesafe</groupId>
		<artifactId>config</artifactId>
		<version>1.2.1</version>
	</dependency>
	<dependency>
		<groupId>com.typesafe.akka</groupId>
		<artifactId>akka-actor_2.11</artifactId>
		<version>2.3.9</version>
	</dependency>
	<dependency>
		<groupId>com.typesafe.akka</groupId>
		<artifactId>akka-slf4j_2.11</artifactId>
		<version>2.3.9</version>
	</dependency>
	<dependency>
		<groupId>javax.servlet</groupId>
		<artifactId>javax.servlet-api</artifactId>
		<version>3.1.0</version>
	</dependency>
	<dependency>
		<groupId>aopalliance</groupId>
		<artifactId>aopalliance</artifactId>
		<version>1.0</version>
	</dependency>
	<dependency>
		<groupId>org.jvnet.mimepull</groupId>
		<artifactId>mimepull</artifactId>
		<version>1.9.4</version>
	</dependency>
</dependencies> 

...

Create a sos.ini file and copy your license key to the this file. This is a technical license key that ships with the Open Source License and with the Commercial License of the software. The file should look like this:

...

Code Block
languagetext
titlelog4j.properties
collapsetrue
log4j.rootCategory=info, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.logger.org.hibernate=fatal
log4j.logger.JobScheduler=fatal
log4j.logger.com.sos.scheduler.engine=info
# see http://www.sos-berlin.com/doc/en/scheduler.doc/api/Log-javax.script.xml
log4j.logger.com.sos.scheduler.engine.jobapi.scripting=debug, scheduler
log4j.appender.scheduler=org.apache.log4j.ConsoleAppender
log4j.appender.scheduler.layout=org.apache.log4j.PatternLayout
log4j.appender.scheduler.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

Now your home folder should contain at least these files (windows-x64 example, other platforms differ):

...

  1. Create a folder with the name live in your working directory (your home folder). Create a simple job in the live folder .like this:

    Code Block
    languagexml
    titlehello world job example
    collapsetrue
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <job ><job>
        <script  language="shell">
            <![CDATA[echo Hello World!]]>
        </script>
        <run_time  once="yes"/>
    </job>
  2. Open a console in your working directory home folder and start the JobScheduler with the start.cmd start script.
    If you have configured logging (log4j.properties and path to the properties file in the factory.iniini file) then you should see a task log and job log for the sample job like this:

    Code Block
    languagetext
    titletask log
    collapsetrue
    2015-10-07 14:58:45.515+0200 [info]   SCHEDULER-918  state=starting (at=never)
    2015-10-07 14:58:45.516+0200 [info]   SCHEDULER-987  Starting process: "C:\Users\YOUR_USERNAME\AppData\Local\Temp\\sos5051B.cmd"
    2015-10-07 14:58:45.526+0200 [info]    
    2015-10-07 14:58:45.526+0200 [info]   PATH_TO_YOUR_FOLDER>echo Hello World!  
    2015-10-07 14:58:45.526+0200 [info]   Hello World!
    2015-10-07 14:58:45.527+0200 [info]   SCHEDULER-915  Process event
    2015-10-07 14:58:45.556+0200 [info]   SCHEDULER-918  state=closed
    2015-10-07 14:58:45.556+0200 [info]   SCHEDULER-962  Protocol ends in logs/task.HalloWorldExample.log
    Code Block
    languagetext
    titlejob log
    collapsetrue
    2015-10-07 14:58:45.507+0200 [info]   SCHEDULER-893  Job is 'active' now
    2015-10-07 14:58:45.512+0200 [info]   SCHEDULER-930  Task 6114864 started - cause: period_once
    2015-10-07 14:59:45.716+0200 [info]   SCHEDULER-931  state=stopped
    2015-10-07 14:59:45.717+0200 [info]   SCHEDULER-962  Protocol ends in logs/job.HalloWorldExample.log

...