The goal of this system is to handle the execution of multiple types of Jobs.
Creating a command job that simply prints "Hello World"
/*Given a command and a priority*/
Job printHelloWorld = new CommandJob(()->{
System.out.println("Hello World");
return JobCode.SUCCESS;
},10);
Scheduling a Job
long scheduleFor = System.currentTimeMillis() + 1000 //1 second from start
JobManagementService.scheduleJob(printHelloWorld, scheduleFor);
Starting the Job Management System, blocks
JobManagementService.start();
/*
//Starting Async
JobManagementService.startAsync();
*/