Date: Fri, 29 Mar 2024 01:56:39 +0000 (UTC) Message-ID: <1835573894.12247.1711677399192@change.sos-berlin.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_12246_1077227918.1711677399191" ------=_Part_12246_1077227918.1711677399191 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This document explains
/bin
folder has to be added to the globa=
l variable "PATH
" in order to take effect.JS-1508 - Getting issue details... STATU= S
= JS-809 = - Getting issue details... STATUS<= /span>
= JS-785 = - Getting issue details... STATUS<= /span>
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 <=
a class=3D"external-link" href=3D"http://semver.org/" rel=3D"nofollow">sema=
ntic versioning scheme. This sample version number is used for the exam=
ples in this article.
The jobscheduler.engi=
ne-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 v=
ia maven, add the following configuration to the pom.xml
=
file of your project.
<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 file looks like this:
|-linux-x64=09=09=09=09=09=09=09=09=09=09=09 |=09|-bin |=09|=09|---.version-engine |=09|=09|---scheduler |=09|-lib |=09|=09|---libjobscheduler-engine.so |-linux-x86 |=09|-bin |=09|=09|---.version-engine |=09|=09|---scheduler |=09|-lib |=09|=09|---libjobscheduler-engine.so |-windows-x64 |=09|-bin |=09|=09|---.version-engine |=09|=09|---jobscheduler-engine.dll |=09|=09|---scheduler.exe |-windows-x86 |=09|-bin |=09|=09|---.version-engine |=09|=09|---scheduler.exe |---com.sos-berlin.jobscheduler.engine-1.9.6.jar
sos.ini
factory.ini
scheduler.xml
To get a minimal JobScheduler up and running, create a home folder, e.g.=
myJobScheduler
, and copy the binaries according to your opera=
ting systemto this folder.
Add the following files to a folder:
jobsche=
duler.engine-1.9.6.pom
file. If you copy the 3rd party libraries to a different folder th=
en you have to add this folder to the class_path
setting in th=
e [java]
section of the factory.ini
file. =
span>
<dependencies> =09<dependency> =09=09<groupId>com.google.guava</groupId> =09=09<artifactId>guava</artifactId> =09=09<version>18.0</version> =09</dependency> =09<dependency> =09=09<groupId>javax.inject</groupId> =09=09<artifactId>javax.inject</artifactId> =09=09<version>1</version> =09</dependency> =09<dependency> =09=09<groupId>com.google.inject</groupId> =09=09<artifactId>guice</artifactId> =09=09<version>3.0</version> =09</dependency> =09<dependency> =09=09<groupId>com.h2database</groupId> =09=09<artifactId>h2</artifactId> =09=09<version>1.4.186</version> =09</dependency> =09<dependency> =09=09<groupId>commons-net</groupId> =09=09<artifactId>commons-net</artifactId> =09=09<version>3.3</version> =09</dependency> =09<dependency> =09=09<groupId>javax.mail</groupId> =09=09<artifactId>mail</artifactId> =09=09<version>1.4.7</version> =09</dependency> =09<dependency> =09=09<groupId>org.eclipse.persistence</groupId> =09=09<artifactId>javax.persistence</artifactId> =09=09<version>2.1.0</version> =09</dependency> =09<dependency> =09=09<groupId>org.scalactic</groupId> =09=09<artifactId>scalactic_2.11</artifactId> =09=09<version>2.2.4</version> =09</dependency> =09<dependency> =09=09<groupId>org.scala-lang</groupId> =09=09<artifactId>scala-library</artifactId> =09=09<version>2.11.6</version> =09</dependency> =09<dependency> =09=09<groupId>org.scala-lang</groupId> =09=09<artifactId>scala-reflect</artifactId> =09=09<version>2.11.6</version> =09</dependency> =09<dependency> =09=09<groupId>org.scala-lang.modules</groupId> =09=09<artifactId>scala-xml_2.11</artifactId> =09=09<version>1.0.3</version> =09</dependency> =09<dependency> =09=09<groupId>xerces</groupId> =09=09<artifactId>xercesImpl</artifactId> =09=09<version>2.11.0</version> =09</dependency> =09<dependency> =09=09<groupId>xml-apis</groupId> =09=09<artifactId>xml-apis</artifactId> =09=09<version>1.4.01</version> =09</dependency> =09<dependency> =09=09<groupId>joda-time</groupId> =09=09<artifactId>joda-time</artifactId> =09=09<version>2.5</version> =09</dependency> =09<dependency> =09=09<groupId>org.joda</groupId> =09=09<artifactId>joda-convert</artifactId> =09=09<version>1.7</version> =09</dependency> =09<dependency> =09=09<groupId>org.eclipse.jetty</groupId> =09=09<artifactId>jetty-server</artifactId> =09=09<version>8.1.16.v20140903</version> =09</dependency> =09<dependency> =09=09<groupId>org.eclipse.jetty</groupId> =09=09<artifactId>jetty-servlet</artifactId> =09=09<version>8.1.16.v20140903</version> =09</dependency> =09<dependency> =09=09<groupId>org.eclipse.jetty</groupId> =09=09<artifactId>jetty-servlets</artifactId> =09=09<version>8.1.16.v20140903</version> =09</dependency> =09<dependency> =09=09<groupId>org.eclipse.jetty</groupId> =09=09<artifactId>jetty-xml</artifactId> =09=09<version>8.1.16.v20140903</version> =09</dependency> =09<dependency> =09=09<groupId>org.eclipse.jetty</groupId> =09=09<artifactId>jetty-client</artifactId> =09=09<version>8.1.16.v20140903</version> =09</dependency> =09<dependency> =09=09<groupId>org.eclipse.jetty</groupId> =09=09<artifactId>jetty-webapp</artifactId> =09=09<version>8.1.16.v20140903</version> =09</dependency> =09<dependency> =09=09<groupId>org.eclipse.jetty</groupId> =09=09<artifactId>jetty-websocket</artifactId> =09=09<version>8.1.16.v20140903</version> =09</dependency> =09<dependency> =09=09<groupId>com.sun.jersey</groupId> =09=09<artifactId>jersey-server</artifactId> =09=09<version>1.19</version> =09</dependency> =09<dependency> =09=09<groupId>com.sun.jersey.contribs</groupId> =09=09<artifactId>jersey-guice</artifactId> =09=09<version>1.19</version> =09</dependency> =09<dependency> =09=09<groupId>com.sun.jersey</groupId> =09=09<artifactId>jersey-client</artifactId> =09=09<version>1.19</version> =09</dependency> =09<dependency> =09=09<groupId>org.slf4j</groupId> =09=09<artifactId>slf4j-api</artifactId> =09=09<version>1.7.10</version> =09</dependency> =09<dependency> =09=09<groupId>org.slf4j</groupId> =09=09<artifactId>slf4j-log4j12</artifactId> =09=09<version>1.7.10</version> =09</dependency> =09<dependency> =09=09<groupId>org.slf4j</groupId> =09=09<artifactId>jul-to-slf4j</artifactId> =09=09<version>1.7.10</version> =09</dependency> =09<dependency> =09=09<groupId>log4j</groupId> =09=09<artifactId>log4j</artifactId> =09=09<version>1.2.16</version> =09</dependency> =09<dependency> =09=09<groupId>com.google.code.findbugs</groupId> =09=09<artifactId>jsr305</artifactId> =09=09<version>3.0.0</version> =09</dependency> =09<dependency> =09=09<groupId>javax.ws.rs</groupId> =09=09<artifactId>jsr311-api</artifactId> =09=09<version>1.1.1</version> =09</dependency> =09<dependency> =09=09<groupId>com.fasterxml.jackson.core</groupId> =09=09<artifactId>jackson-core</artifactId> =09=09<version>2.4.3</version> =09</dependency> =09<dependency> =09=09<groupId>com.fasterxml.jackson.core</groupId> =09=09<artifactId>jackson-databind</artifactId> =09=09<version>2.4.3</version> =09</dependency> =09<dependency> =09=09<groupId>com.fasterxml.jackson.core</groupId> =09=09<artifactId>jackson-annotations</artifactId> =09=09<version>2.4.3</version> =09</dependency> =09<dependency> =09=09<groupId>com.fasterxml.jackson.jaxrs</groupId> =09=09<artifactId>jackson-jaxrs-json-provider</artifactId> =09=09<version>2.4.3</version> =09</dependency> =09<dependency> =09=09<groupId>com.fasterxml.jackson.datatype</groupId> =09=09<artifactId>jackson-datatype-guava</artifactId> =09=09<version>2.4.3</version> =09</dependency> =09<dependency> =09=09<groupId>com.fasterxml.jackson.module</groupId> =09=09<artifactId>jackson-module-scala_2.11</artifactId> =09=09<version>2.4.3</version> =09</dependency> =09<dependency> =09=09<groupId>commons-beanutils</groupId> =09=09<artifactId>commons-beanutils</artifactId> =09=09<version>1.9.2</version> =09</dependency> =09<dependency> =09=09<groupId>io.spray</groupId> =09=09<artifactId>spray-json_2.11</artifactId> =09=09<version>1.3.1</version> =09</dependency> =09<dependency> =09=09<groupId>io.spray</groupId> =09=09<artifactId>spray-http_2.11</artifactId> =09=09<version>1.3.2</version> =09</dependency> =09<dependency> =09=09<groupId>io.spray</groupId> =09=09<artifactId>spray-client_2.11</artifactId> =09=09<version>1.3.2</version> =09</dependency> =09<dependency> =09=09<groupId>com.typesafe</groupId> =09=09<artifactId>config</artifactId> =09=09<version>1.2.1</version> =09</dependency> =09<dependency> =09=09<groupId>com.typesafe.akka</groupId> =09=09<artifactId>akka-actor_2.11</artifactId> =09=09<version>2.3.9</version> =09</dependency> =09<dependency> =09=09<groupId>com.typesafe.akka</groupId> =09=09<artifactId>akka-slf4j_2.11</artifactId> =09=09<version>2.3.9</version> =09</dependency> =09<dependency> =09=09<groupId>javax.servlet</groupId> =09=09<artifactId>javax.servlet-api</artifactId> =09=09<version>3.1.0</version> =09</dependency> =09<dependency> =09=09<groupId>aopalliance</groupId> =09=09<artifactId>aopalliance</artifactId> =09=09<version>1.0</version> =09</dependency> =09<dependency> =09=09<groupId>org.jvnet.mimepull</groupId> =09=09<artifactId>mimepull</artifactId> =09=09<version>1.9.4</version> =09</dependency> </dependencies>
Create a sos.ini
file and copy your license key to th=
is 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:
[licence] key1 =3D PUT_YOUR_KEY_HERE
Create a factory.ini
file with e.g. the following con=
figuration:
[spooler] ; enable job history, if set to True the scheduler = keeps a job history in database tables history =3D yes ; store job protocol for task history (yes|no|gzip,= default: no) history_with_log =3D gzip ; store job protocol for order history (yes|no|gzip= , default: no) order_history_with_log =3D gzip ; store protocol for scheduler history (yes|no|gzip= , default: no) history_archive =3D gzip ; database configuration examples for job history ;=09=09=09=09=09=09 active configuration db =3D jdbc -class=3Dorg.mariadb.jdbc.Driver jdbc:mysq= l://localhost:3306/scheduler -user=3DDB_USER -password=3DDB_USER_PASSWD db_class =3D SOSMySQLConnection ; sample configuration for MySQL ;db =3D jdbc -class=3Dcom.mysql.jdbc.Driver jdbc:mysql:= //localhost:3306/scheduler -user=3DDB_USER -password=3DDB_USER_PASSWD ;db_class =3D SOSMySQLConnection ; sample configuration for MySQL via mariaDB ;db =3D jdbc -class=3Dorg.mariadb.jdbc.Driver jdbc:mysq= l://localhost:3306/scheduler -user=3DDB_USER -password=3DDB_USER_PASSWD ;db_class =3D SOSMySQLConnection ; sample configuration for Oracle ;db =3D jdbc -class=3Doracle.jdbc.driver.OracleDriver j= dbc:oracle:thin:@//localhost:1521/scheduler -user=3DDB_USER -password=3DDB_= USER_PASSWD ;db_class =3D SOSOracleConnection ; sample configuration for Microsoft SQL Server ;db =3D jdbc -class=3Dcom.microsoft.sqlserver.jdbc.SQLS= erverDriver jdbc:sqlserver://localhost:1433;sendStringParametersAsUnicode= =3Dfalse;selectMethod=3Dcursor;databaseName=3Dscheduler -user=3DDB_USER -pa= ssword=3DDB_USER_PASSWD ;db_class =3D SOSMSSQLConnection ; sample configuration for Microsoft SQL Server via= jTDS ;db =3D jdbc -class=3Dnet.sourceforge.jtds.jdbc.Driver = jdbc:jtds:sqlserver://localhost:1433;sendStringParametersAsUnicode=3Dfalse;= selectMethod=3Dcursor;databaseName=3Dscheduler -user=3DDB_USER -password=3D= DB_USER_PASSWD ;db_class =3D SOSMSSQLConnection ; sample configuration for Postgres SQL ;db =3D jdbc -class=3Dorg.postgresql.Driver jdbc:postgr= esql://localhost:5432/scheduler -user=3DDB_USER -password=3DDB_USER_PASSWD ;db_class =3D SOSPgSQLConnection ; sample configuration for Firebird ;db =3D jdbc -class=3Dorg.firebirdsql.jdbc.FBDriver jdb= c:firebirdsql://localhost:3050/scheduler -user=3DDB_USER -password=3DDB_USE= R_PASSWD ;db_class =3D SOSFbSQLConnection ; sample configuration for DB2 ;db =3D jdbc -class=3Dcom.ibm.db2.jcc.DB2Driver jdbc:db= 2://localhost:50000/scheduler:driverType=3D2;retrieveMessagesFromServerOnGe= tMessage=3Dtrue; -user=3DDB_USER -password=3DDB_USER_PASSWD ;db_class =3D SOSDB2Connection ; sample configuration for Sybase ;db =3D jdbc -class=3Dcom.sybase.jdbc3.jdbc.SybDriver j= dbc:sybase:Tds:localhost:5000/scheduler -user=3DDB_USER -password=3DDB_USER= _PASSWD ;db_class =3D SOSSybaseConnection ; sample configuration for Sybase via jTDS ;db =3D jdbc -class=3Dnet.sourceforge.jtds.jdbc.Driver = jdbc:jtds:sybase://localhost:5000/scheduler -user=3DDB_USER -password=3DDB_= USER_PASSWD ;db_class =3D SOSSybaseConnection ; log level (info|debug1|...|debug9, default: info) log_level =3D info ; log directory log_dir =3D logs ; log filename and log categories (see http://www.s= os-berlin.com/doc/en/scheduler.doc/factory_ini_spooler.xml#entry_log) log =3D PATH/TO/YOUR/logs/scheduler.log [java] class_path =3D PATH/TO/YOUR/3rdPartyLibraries/*.jar; ; put your Java VM parameters here options =3D -Dlog4j.configuration=3D"file:///PATH/TO/YOUR/l= og4j.properties" ; enable detailed Java debug messages debug =3D no
For this example, we created a lib=
s
folder in the home folder and copied the 3rd party libraries and t=
he 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 =3D libs/*.jar;
Otherwise an absolute path to the folder where the 3rd party libraries a= re copied to has to be configured.
Create a file scheduler.xml
and configure the po=
rt your JobScheduler should listen to:
<?xml version=3D"1.0" encoding=3D"ISO-8859-1" standalone=3D"no"?= > <spooler> =09=09<config port=3D"4444"> =09=09=09=09<params> =09=09=09=09=09=09<param name=3D"scheduler.order.keep_order_content_on_r= eschedule" value=3D"false"/> =09=09=09=09</params> =09=09=09=09<security ignore_unknown_hosts=3D"yes"> =09=09=09=09=09=09<allowed_host host=3D"localhost" level=3D"all"/> =09=09=09=09</security> =09=09=09=09<plugins> =09=09=09=09=09=09<plugin java_class=3D"com.sos.scheduler.engine.plugins= .webservice.WebServicePlugin"/> =09=09=09=09=09=09<plugin java_class=3D"com.sos.scheduler.engine.plugins= .nodeorder.NodeOrderPlugin"/> =09=09=09=09</plugins> =09=09</config> </spooler>
Finally create a start script like this:
@echo set exepath=3D%~dp0 scheduler.exe -sos.ini=3D"%exepath%sos.ini" -config=3D"%exepath%scheduler.x= ml" -ini=3D"%exepath%factory.ini"
log4j.rootCategory=3Dinfo, stdout log4j.appender.stdout=3Dorg.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=3D%5p [%t] (%F:%L) - %m%n log4j.logger.org.hibernate=3Dfatal log4j.logger.JobScheduler=3Dfatal log4j.logger.com.sos.scheduler.engine=3Dinfo # see http://www.sos-berlin.com/doc/en/scheduler.doc/api/Log-javax.script.x= ml log4j.logger.com.sos.scheduler.engine.jobapi.scripting=3Ddebug, scheduler log4j.appender.scheduler=3Dorg.apache.log4j.ConsoleAppender log4j.appender.scheduler.layout=3Dorg.apache.log4j.PatternLayout log4j.appender.scheduler.layout.ConversionPattern=3D%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
Create a folder with the name live
in your home fo=
lder. Create a simple job in the live
folder like this:
<?xml version=3D"1.0" encoding=3D"ISO-8859-1"?> <job> <script language=3D"shell"> <![CDATA[echo Hello World!]]> </script> <run_time once=3D"yes"/> </job>
Open a console in your home folder and start the JobScheduler with t=
he 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:
2015-10-07 14:58:45.515+0200 [info] SCHEDULER-918 state=3Dstart= ing (at=3Dnever) 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] =20 2015-10-07 14:58:45.526+0200 [info] PATH_TO_YOUR_FOLDER>echo Hello Wor= ld! =20 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=3Dclosed 2015-10-07 14:58:45.556+0200 [info] SCHEDULER-962 Protocol ends in logs/= task.HalloWorldExample.log
2015-10-07 14:58:45.507+0200 [info] SCHEDULER-893 Job is 'activ= e' 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=3Dstopped 2015-10-07 14:59:45.717+0200 [info] SCHEDULER-962 Protocol ends in logs/= job.HalloWorldExample.log
T | Key | Linked Issues | Fix Version/s | Status | P | Summary | Updated |
---|---|---|---|---|---|---|---|
= | JS-1508= a> | JS-1561 | 1.10.1 | Released | Publish binary files of J= obScheduler releases to Maven Central Repository | Dec 21, = 2015 | |
= | JS-809= | 1.10 | Released | Umstellung des scheduler b= uilds auf maven 3 | Dec 21, = 2015 | ||
= | JS-785= | 1.10 | Released | Publish JobScheduler sourc= es to publicly available repository | Dec 21, = 2015 |