Search in sources :

Example 11 with JobInfo

use of org.exoplatform.services.scheduler.JobInfo in project kernel by exoplatform.

the class TestSchedulerService method testgetAvailableJobs.

public void testgetAvailableJobs() throws Exception {
    List<JobDetail> availableJobs = service_.getAllJobs();
    int size = availableJobs.size();
    // some information about job execution
    Date firedTime = new Date(System.currentTimeMillis() + 1000000);
    service_.addJob(new JobInfo("queuejob", null, /* default group */
    AJob.class), firedTime);
    availableJobs = service_.getAllJobs();
    assertEquals("Expect one job inthe queue", size + 1, availableJobs.size());
}
Also used : JobDetail(org.quartz.JobDetail) JobInfo(org.exoplatform.services.scheduler.JobInfo) Date(java.util.Date)

Aggregations

JobInfo (org.exoplatform.services.scheduler.JobInfo)11 JobDetail (org.quartz.JobDetail)8 SimpleTrigger (org.quartz.SimpleTrigger)6 Trigger (org.quartz.Trigger)6 Date (java.util.Date)5 JobBuilder (org.quartz.JobBuilder)2 PeriodInfo (org.exoplatform.services.scheduler.PeriodInfo)1 JobListener (org.quartz.JobListener)1 TriggerListener (org.quartz.TriggerListener)1