Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 'Change Management References' added

Table of Contents

Scope

This document explains

  • how to download the JobScheduler engine binaries from Maven Central,
  • the structure of the binaries

...

  • ,
  • how to setup a minimal JobScheduler with

...

  • the binaries.

Prerequisites

...

  • to download the binaries and to integrate them in your application

...

  • it is required that you have Maven installed.

Maven

  • You can find Check the Maven documentation hereDocumentation.SOS uses
  • Maven 3.2.1. You can download the latest Release from here.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 Further configuration is not required for Maven in order to compile.  If further configuration is wanted
    For individual configuration, for example to receive certain 3rd Party libraries from an official a Maven2 repository , e.g. other than http://repo1.maven.org/maven2, then you have to configure the settings.xml file.

The binaries file

  • jobscheduler.engine-1.9.6.jar

  • jobscheduler.engine-1.9.6.pom

The structure of the Binaries

The jobscheduler.engine-1.9.6.jar is a bundle jar with all binaries as well as the JobScheduler engine java library.

To integrate it in your own maven project or to download it via maven, add the following configuration to the pom.xml of your project.

Code Block
languagexml
titleMaven dependency snippet
collapsetrue
<dependency>
  <groupId>com.sos-berlin</groupId>
  <artifactId>jobscheduler.engine</artifactId>
  <version>1.9.6</version>
</dependency>

The structure of the jobscheduler.engine-1.9.6.jar looks like this:

Code Block
languagetext
titlestructure of jobscheduler.engine-1.9.6.jar
collapsetrue
|-linux-x64											
|	|-bin
|	|	|---.version-engine
|	|	|---scheduler
|	|-lib
|	|	|---libjobscheduler-engine.so
|-linux-x86
|	|-bin
|	|	|---.version-engine
|	|	|---scheduler
|	|-lib
|	|	|---libjobscheduler-engine.so
|-windows-x64
|	|-bin
|	|	|---.version-engine
|	|	|---jobscheduler-engine.dll
|	|	|---scheduler.exe
|-windows-x86
|	|-bin
|	|	|---.version-engine
|	|	|---scheduler.exe
|---com.sos-berlin.jobscheduler.engine-1.9.6.jar

Setting up a JobScheduler with the binaries

Required configuration files

  • sos.ini
  • factory.ini
  • scheduler.xml

Configuration

Step 1

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

Step 2

Related Issues

  • Jira
    serverSOS JIRA
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId6dc67751-9d67-34cd-985b-194a8cdc9602
    keyJS-1508

  • Jira
    serverSOS JIRA
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId6dc67751-9d67-34cd-985b-194a8cdc9602
    keyJS-809

  • Jira
    serverSOS JIRA
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId6dc67751-9d67-34cd-985b-194a8cdc9602
    keyJS-785

The Binaries File

  • jobscheduler.engine-1.9.6.jar

  • jobscheduler.engine-1.9.6.pom

The version number 1.9.6 from this sample is based on the semantic versioning scheme. This sample version number is used for the examples in this article.

The Structure of the Binaries

The jobscheduler.engine-1.9.6.jar file is a bundle jar with all binaries as well as the JobScheduler engine Java library included.

To integrate the library into your own maven project or to download it via maven, add the following configuration to the pom.xml file of your project.

Code Block
languagexml
titleMaven dependency snippet
collapsetrue
<dependency>
  <groupId>com.sos-berlin</groupId>
  <artifactId>jobscheduler.engine</artifactId>
  <version>1.9.6</version>
</dependency>

The structure of Add the 3rd Party libraries which are configured in the jobscheduler.engine-1.9.6.pom to a folder as well as the database driver you use. You can copy the 3rd party libraries to a different folder as well, as long as you make sure to configure the path in the factory.ini. jar file looks like this:

Code Block
languagetext
titlestructure of
Code Block
languagexml
titledependency snippet from the jobscheduler.engine-1.9.6-pom.jar
collapsetrue
|-linux-x64											
|	|-bin
|	|	|---.version-engine
|	|	|---scheduler
|	|-lib
|	|	|---libjobscheduler-engine.so
|-linux-x86
|	|-bin
|	|	|---.version-engine
|	|	|---scheduler
|	|-lib
|	|	|---libjobscheduler-engine.so
|-windows-x64
|	|-bin
|	|	|---.version-engine
|	|	|---jobscheduler-engine.dll
|	|	|---scheduler.exe
|-windows-x86
|	|-bin
|	|	|---.version-engine
|	|	|---scheduler.exe
|---com.sos-berlin.jobscheduler.engine-1.9.6.jar

Setting up a JobScheduler with the Binaries

Required configuration files

  • sos.ini
  • factory.ini
  • scheduler.xml

Configuration

Step 1

To get a minimal JobScheduler up and running, create a home folder, e.g. myJobScheduler, and copy the binaries according to your operating systemto 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 Java library com.sos-berlin.jobscheduler.engine-1.9.6.jar from the bundle
  • the JDBC database driver you want to use.

 If you copy the 3rd party libraries to a different folder then you have to 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<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>javax.inject</groupId>
		<artifactId>xml-apis<<artifactId>javax.inject</artifactId>
		<version>1.4.01<<version>1</version>
	</dependency>
	<dependency>
		<groupId>joda-time<<groupId>com.google.inject</groupId>
		<artifactId>joda-time<<artifactId>guice</artifactId>
		<version>2<version>3.5<0</version>
	</dependency>
	<dependency>
		<groupId>org<groupId>com.joda<h2database</groupId>
		<artifactId>joda-convert<<artifactId>h2</artifactId>
		<version>1.4.7<186</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty<<groupId>commons-net</groupId>
		<artifactId>jetty<artifactId>commons-server<net</artifactId>
		<version>8.1.16.v20140903<<version>3.3</version>
	</dependency>
	<dependency>
		<groupId>org<groupId>javax.eclipse.jetty<mail</groupId>
		<artifactId>jetty-servlet<<artifactId>mail</artifactId>
		<version>8<version>1.14.16.v20140903<7</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty<persistence</groupId>
		<artifactId>jetty-servlets<<artifactId>javax.persistence</artifactId>
		<version>8<version>2.1.16.v20140903<0</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty<scalactic</groupId>
		<artifactId>jetty-xml<<artifactId>scalactic_2.11</artifactId>
		<version>8<version>2.12.16.v20140903<4</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty<scala-lang</groupId>
		<artifactId>jetty<artifactId>scala-client<library</artifactId>
		<version>8<version>2.111.16.v20140903<6</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty<scala-lang</groupId>
		<artifactId>jetty<artifactId>scala-webapp<reflect</artifactId>
		<version>8<version>2.111.16.v20140903<6</version>
	</dependency>
	<dependency>
		<groupId>org.eclipsescala-lang.jetty<modules</groupId>
		<artifactId>jetty-websocket<<artifactId>scala-xml_2.11</artifactId>
		<version>8<version>1.10.16.v20140903<3</version>
	</dependency>
	<dependency>
		<groupId>com.sun.jersey<<groupId>xerces</groupId>
		<artifactId>jersey-server<<artifactId>xercesImpl</artifactId>
		<version>1<version>2.11.19<0</version>
	</dependency>
	<dependency>
		<groupId>com.sun.jersey.contribs<<groupId>xml-apis</groupId>
		<artifactId>jersey<artifactId>xml-guice<apis</artifactId>
		<version>1.4.19<01</version>
	</dependency>
	<dependency>
		<groupId>com.sun.jersey<<groupId>joda-time</groupId>
		<artifactId>jersey<artifactId>joda-client<time</artifactId>
		<version>1<version>2.19<5</version>
	</dependency>
	<dependency>
		<groupId>org.slf4j<joda</groupId>
		<artifactId>slf4j<artifactId>joda-api<convert</artifactId>
		<version>1.7.10<7</version>
	</dependency>
	<dependency>
		<groupId>org.slf4j<eclipse.jetty</groupId>
		<artifactId>slf4j<artifactId>jetty-log4j12<server</artifactId>
		<version>1<version>8.1.716.10<v20140903</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.slf4j<jetty</groupId>
		<artifactId>jul<artifactId>jetty-to-slf4j<servlet</artifactId>
		<version>1<version>8.1.716.10<v20140903</version>
	</dependency>
	<dependency>
		<groupId>log4j<<groupId>org.eclipse.jetty</groupId>
		<artifactId>log4j<<artifactId>jetty-servlets</artifactId>
		<version>1<version>8.21.16<16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>com<groupId>org.googleeclipse.code.findbugs<jetty</groupId>
		<artifactId>jsr305<<artifactId>jetty-xml</artifactId>
		<version>3<version>8.1.016.0<v20140903</version>
	</dependency>
	<dependency>
		<groupId>javax<groupId>org.wseclipse.rs<jetty</groupId>
		<artifactId>jsr311<artifactId>jetty-api<client</artifactId>
		<version>1<version>8.1.16.1<v20140903</version>
	</dependency>
	<dependency>
		<groupId>com<groupId>org.fasterxmleclipse.jackson.core<jetty</groupId>
		<artifactId>jackson<artifactId>jetty-core<webapp</artifactId>
		<version>2<version>8.1.416.3<v20140903</version>
	</dependency>
	<dependency>
		<groupId>com<groupId>org.fasterxmleclipse.jackson.core<jetty</groupId>
		<artifactId>jackson<artifactId>jetty-databind<websocket</artifactId>
		<version>2<version>8.41.3<16.v20140903</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxmlsun.jackson.core<jersey</groupId>
		<artifactId>jackson<artifactId>jersey-annotations<server</artifactId>
		<version>2<version>1.4.3<19</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxmlsun.jacksonjersey.jaxrs<contribs</groupId>
		<artifactId>jackson-jaxrs-json-provider<<artifactId>jersey-guice</artifactId>
		<version>2<version>1.4.3<19</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxmlsun.jackson.datatype<jersey</groupId>
		<artifactId>jackson<artifactId>jersey-datatype-guava<client</artifactId>
		<version>2<version>1.4.3<19</version>
	</dependency>
	<dependency>
		<groupId>com.fasterxml.jackson.module<<groupId>org.slf4j</groupId>
		<artifactId>jackson-module-scala_2.11<<artifactId>slf4j-api</artifactId>
		<version>2<version>1.47.3<10</version>
	</dependency>
	<dependency>
		<groupId>commons-beanutils<<groupId>org.slf4j</groupId>
		<artifactId>commons<artifactId>slf4j-beanutils<log4j12</artifactId>
		<version>1.97.2<10</version>
	</dependency>
	<dependency>
		<groupId>io<groupId>org.spray<slf4j</groupId>
		<artifactId>spray-json_2.11<<artifactId>jul-to-slf4j</artifactId>
		<version>1.37.1<10</version>
	</dependency>
	<dependency>
		<groupId>io.spray<<groupId>log4j</groupId>
		<artifactId>spray-http_2.11<<artifactId>log4j</artifactId>
		<version>1.32.2<16</version>
	</dependency>
	<dependency>
		<groupId>io.spray<<groupId>com.google.code.findbugs</groupId>
		<artifactId>spray-client_2.11<<artifactId>jsr305</artifactId>
		<version>1<version>3.30.2<0</version>
	</dependency>
	<dependency>
		<groupId>com<groupId>javax.ws.typesafe<rs</groupId>
		<artifactId>config<<artifactId>jsr311-api</artifactId>
		<version>1.21.1</version>
	</dependency>
	<dependency>
		<groupId>com.typesafefasterxml.jackson.akka<core</groupId>
		<artifactId>akka-actor_2.11<<artifactId>jackson-core</artifactId>
		<version>2.34.9<3</version>
	</dependency>
	<dependency>
		<groupId>com.typesafefasterxml.jackson.akka<core</groupId>
		<artifactId>akka-slf4j_2.11<<artifactId>jackson-databind</artifactId>
		<version>2.34.9<3</version>
	</dependency>
	<dependency>
		<groupId>javax.servlet<<groupId>com.fasterxml.jackson.core</groupId>
		<artifactId>javax.servlet<artifactId>jackson-api<annotations</artifactId>
		<version>3<version>2.14.0<3</version>
	</dependency>
	<dependency>
		<groupId>aopalliance<<groupId>com.fasterxml.jackson.jaxrs</groupId>
		<artifactId>aopalliance<<artifactId>jackson-jaxrs-json-provider</artifactId>
		<version>1<version>2.4.0<3</version>
	</dependency>
	<dependency>
		<groupId>org<groupId>com.fasterxml.jvnetjackson.mimepull<datatype</groupId>
		<artifactId>mimepull<<artifactId>jackson-datatype-guava</artifactId>
		<version>1<version>2.94.4<3</version>
	</dependency>
</dependencies> 

Step 3

Create a sos.ini file and copy your licence key to the file. The file should look like this:

Code Block
languagetext
titlesos.ini
collapsetrue
[licence]
key1                    = PUT_YOUR_KEY_HERE

Create a factory.ini file with the following configuration:

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

Step 3

Create a sos.ini file and copy your license key to 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
titlesos.ini
collapsetrue
[licence]
key1
Code Block
languagetext
titlefactory.ini
collapsetrue
[spooler]
;                         enable job history, if set to True the scheduler keeps a job history in database tables
history                 = yes


;                         store job protocol for task history (yes|no|gzip, default: no)
history_with_log        = gzip


;                         store job protocol for order history (yes|no|gzip, default: no)
order_history_with_log  = gzip


;                         store protocol for scheduler history (yes|no|gzip, default: no)
history_archive         = gzip


;                         database configuration examples for job history
;						  active configuration
db                      = jdbc -class=org.mariadb.jdbc.Driver jdbc:mysql://localhost:3306/scheduler -user=DB_USER -password=DB_USER_PASSWD
db_class                = SOSMySQLConnection

;                         sample configuration for MySQL
;db                     = jdbc -class=com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSMySQLConnection
;        = PUT_YOUR_KEY_HERE

Create a factory.ini file with e.g. the following configuration:

Code Block
languagetext
titlefactory.ini
collapsetrue
[spooler]
;                 sample  configuration for MySQL via mariaDB
;db    enable job history, if set to True the scheduler keeps a job history in database tables
history  = jdbc -class=org.mariadb.jdbc.Driver jdbc:mysql://localhost:3306/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSMySQLConnectionyes


;                         samplestore job configurationprotocol for Oracle
;dbtask history (yes|no|gzip,      default: no)
history_with_log             = jdbc -class=oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@//localhost:1521/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class= gzip


;               = SOSOracleConnection
;         store job protocol for order            sample configuration for Microsoft SQL Server
;dbhistory (yes|no|gzip, default: no)
order_history_with_log  = gzip


;                         store protocol for =scheduler jdbc -class=com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class      history (yes|no|gzip, default: no)
history_archive            = SOSMSSQLConnectiongzip


;                         sampledatabase configuration examples for Microsoft SQL Server via jTDS
;job history
;						  active configuration
db                      = jdbc -class=netorg.sourceforge.jtdsmariadb.jdbc.Driver jdbc:jtdsmysql:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=3306/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class                = SOSMSSQLConnectionSOSMySQLConnection

;                         sample configuration for Postgres SQLMySQL
;db                     = jdbc -class=orgcom.mysql.postgresqljdbc.Driver jdbc:postgresqlmysql://localhost:54323306/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSPgSQLConnectionSOSMySQLConnection
;                         sample configuration for MySQL Firebirdvia mariaDB
;db                     = jdbc -class=org.firebirdsqlmariadb.jdbc.FBDriverDriver jdbc:firebirdsqlmysql://localhost:30503306/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSFbSQLConnectionSOSMySQLConnection
;                         sample configuration for DB2Oracle
;db                     = jdbc -class=comoracle.ibmjdbc.db2driver.jcc.DB2DriverOracleDriver jdbc:db2oracle:thin:@//localhost:500001521/scheduler:driverType=2;retrieveMessagesFromServerOnGetMessage=true; - -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSDB2ConnectionSOSOracleConnection
;                         sample configuration for SybaseMicrosoft SQL Server
;db                     = jdbc -class=com.sybasemicrosoft.jdbc3sqlserver.jdbc.SybDriverSQLServerDriver jdbc:sybasesqlserver:Tds:localhost:5000///localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSSybaseConnectionSOSMSSQLConnection
;                         sample configuration for SybaseMicrosoft SQL Server via jTDS
;db                     = jdbc -class=net.sourceforge.jtds.jdbc.Driver jdbc:jtds:sybasesqlserver://localhost:5000/1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSSybaseConnectionSOSMSSQLConnection


;                         logsample level (info|debug1|...|debug9, default: info)
log_levelconfiguration for Postgres SQL
;db               = info
;     = jdbc -class=org.postgresql.Driver jdbc:postgresql://localhost:5432/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               log= directory
log_dirSOSPgSQLConnection
;                         sample configuration for Firebird
;db                     = jdbc -class=org.firebirdsql.jdbc.FBDriver jdbc:firebirdsql://localhost:3050/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSFbSQLConnection
;                         sample configuration for DB2
;db                     = jdbc -class=com.ibm.db2.jcc.DB2Driver jdbc:db2://localhost:50000/scheduler:driverType=2;retrieveMessagesFromServerOnGetMessage=true; -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSDB2Connection
;                         sample configuration for Sybase
;db                     = jdbc -class=com.sybase.jdbc3.jdbc.SybDriver jdbc:sybase:Tds:localhost:5000/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSSybaseConnection
;                         sample configuration for Sybase via jTDS
;db                     = jdbc -class=net.sourceforge.jtds.jdbc.Driver jdbc:jtds:sybase://localhost:5000/scheduler -user=DB_USER -password=DB_USER_PASSWD
;db_class               = SOSSybaseConnection


;                         log level (info|debug1|...|debug9, default: info)
log_level               = info
;                         log directory
log_dir                 = logs
;                         log filename and log categories (see http://www.sos-berlin.com/doc/en/scheduler.doc/factory_ini_spooler.xml#entry_log)
log                     = PATH/TO/YOUR/logs/scheduler.log


[java]
class_path              = PATH/TO/YOUR/3rdPartyLibraries/*.jar;
;                         put your Java VM parameters here
options                 = -Dlog4j.configuration="file:///PATH/TO/YOUR/log4j.properties"
;                         enable detailed Java debug messages
debug                   = no
Info

For this example, we created a libs folder in the home folder and copied the 3rd party libraries and the jdbc driver to this folder. Therefore we can use a relative path in the factory.ini.

We set the class path in the factory.ini like this:

[java]
class_path = libs/*.jar;

Otherwise an absolute path to the folder where the 3rd party libraries are copied to has to be configured.

 

Create a file scheduler.xml and configure the port your JobScheduler should listen to:

Code Block
languagexml
titlescheduler.xml
collapsetrue
<?xml version="1.0"          = logs
;                         log filename and log categories (see http://www.sos-berlin.com/doc/en/scheduler.doc/factory_ini_spooler.xml#entry_log)
log                     = PATH/TO/YOUR/logs/scheduler.log


[java]
class_path              = PATH/TO/YOUR/3rdPartyLibraries/*.jar;
;                         put your Java VM parameters here
options                 = -Dlog4j.configuration="file:///PATH/TO/YOUR/log4j.properties"
;                         enable detailed Java debug messages
debug                   = no

Create a scheduler.xml and configure the port your scheduler should run with:

Code Block
languagexml
titlescheduler.xml
collapsetrue
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<spooler>
		<config port="4444">
				<params>
						<param name="scheduler.order.keep_order_content_on_reschedule" value="false"/>
				</params>
				<security ignore_unknown_hosts="yes">
						<allowed_host host="localhost" level="all"/>
				</security>
				<plugins>
						<plugin java_class="com.sos.scheduler.engine.plugins.webservice.WebServicePlugin"/>
						<plugin java_class="com.sos.scheduler.engine.plugins.nodeorder.NodeOrderPlugin"/>
				</plugins>
		</config>
</spooler>

At last, create a start script like this:

Code Block
languagepowershell
titlestart.cmd
collapsetrue
@echo
set exepath=%~dp0
scheduler.exe -sos.ini="%exepath%sos.ini" -config="%exepath%scheduler.xml" -ini="%exepath%factory.ini"

Additional configuration

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 folder should contain at least these files (windows-x64-example):

  • factory.ini
  • jobscheduler-engine.dll
  • log4j.properties(optional)
  • scheduler.exe
  • scheduler.xml
  • sos.ini
  • start.cmd

Testing the scheduler

  1.  

    Create a folder named "live" in your working directory (your folder). Create a simple hello-world-job in the live-folder.

    Code Block
    languagexml
    titlehello world job example
    collapsetrue
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <job >
        <script  language="shell">
            <![CDATA[echo Hello World!]]>
        </script>
        <run_time  once="yes"/>
    </job>
  2. Open a console in your working directory and start the scheduler with the start.cmd strat script.
encoding="ISO-8859-1" standalone="no"?>
<spooler>
		<config port="4444">
				<params>
						<param name="scheduler.order.keep_order_content_on_reschedule" value="false"/>
				</params>
				<security ignore_unknown_hosts="yes">
						<allowed_host host="localhost" level="all"/>
				</security>
				<plugins>
						<plugin java_class="com.sos.scheduler.engine.plugins.webservice.WebServicePlugin"/>
						<plugin java_class="com.sos.scheduler.engine.plugins.nodeorder.NodeOrderPlugin"/>
				</plugins>
		</config>
</spooler>

Finally create a start script like this:

Code Block
languagepowershell
titlestart.cmd
collapsetrue
@echo
set exepath=%~dp0
scheduler.exe -sos.ini="%exepath%sos.ini" -config="%exepath%scheduler.xml" -ini="%exepath%factory.ini"

Additional configuration

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):

  • factory.ini
  • jobscheduler-engine.dll
  • log4j.properties(optional)
  • scheduler.exe
  • scheduler.xml
  • sos.ini
  • start.cmd

Testing the JobScheduler

  1. Create a folder with the name live in 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>
        <script  language="shell">
            <![CDATA[echo Hello World!]]>
        </script>
        <run_time  once="yes"/>
    </job>
  2. Open a console in your 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.ini 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

Change Management References

Jira
serverSOS JIRA
columnstype,key,issuelinks,fixversions,status,priority,summary,updated
maximumIssues20
jqlQuerylabels in (binary-files)
serverId6dc67751-9d67-34cd-985b-194a8cdc9602