Skip to content

giosil/LJSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 18, 2023
f850c01 · Apr 18, 2023

History

73 Commits
May 25, 2022
Oct 29, 2021
Apr 18, 2023
Nov 19, 2021
Nov 9, 2021
Nov 16, 2021
Oct 22, 2021
May 24, 2022
Oct 28, 2021
Oct 27, 2022
Oct 21, 2021
Oct 29, 2021
Oct 21, 2021
Oct 21, 2021
Nov 22, 2021
May 25, 2022

Repository files navigation

LJSA - Light Java Scheduler Application

A job scheduler configurable through RESTful web services.

Dependencies

multi-rpc 2.0.0

  • git clone https://github.com/giosil/multi-rpc.git
  • mvn clean install - this will publish multi-rpc-2.0.0.jar in Maven local repository

Build

  • git clone https://github.com/giosil/LJSA.git
  • mvn clean install

Implement a Job

import java.io.PrintStream;

import org.dew.ljsa.ALJSAJob;
import org.dew.ljsa.LJSAMap;
import org.dew.ljsa.OutputSchedulazione;
import org.dew.ljsa.Schedulazione;

public 
class ExampleLJSAJob extends ALJSAJob
{
  protected PrintStream psLog;
  
  @Override
  public
  void init(Schedulazione sched, OutputSchedulazione out)
    throws Exception
  {
    LJSAMap configurazione = sched.getConfigurazione();
    LJSAMap parametri      = sched.getParametri();
    
    psLog = new PrintStream(out.createReportFile("report.txt"), true);
  }
  
  @Override
  public 
  void execute(Schedulazione sched, OutputSchedulazione out)
    throws Exception 
  {
    psLog.println("Hello World.");
    
    out.setReport("Job completed.");
  }
  
  @Override
  public
  void destroy(Schedulazione sched, OutputSchedulazione out)
    throws Exception
  {
  }
  
  @Override
  public
  void exceptionOccurred(Throwable throwable)
    throws Exception
  {
    throwable.printStackTrace(psLog);
    psLog.println("Job aborted.");
  }
}

Database

Schema

Run LJSA GUI (org.dew.swingup.main.Main) from LJSA-gui (see gui folder) sub-project

Define class

Classes

Define activity

Activities

Schedule activity

Schedule

View Job logs

Job Logs

Check Scheduler

Scheduler

Logs

Logs

File Manager

File Manager

Launch LJSA GUI WebApp from LJSA-gui-web sub-project

Dependencies

wrapp

  • git clone https://github.com/giosil/wrapp.git
  • mvn clean install - this will produce wrapp.war in target directory

Build and deploy web application with Wrapp

  • Create if not exists $HOME/cfg directory
  • Copy json files from cfg to $HOME/cfg
  • Deploy wrapp.war in your application server
  • git clone https://github.com/giosil/LJSA.git
  • cd gui-web
  • mvn clean install - this will produce wljsa.war in target directory
  • Launch http://localhost:8080/wrapp

Define class

Classes

Define activity

Activities

Schedule activity

Schedule

Contributors

About

Light Java Scheduler Application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published