Search in sources :

Example 1 with CronSchedule

use of org.opensearch.jobscheduler.spi.schedule.CronSchedule in project job-scheduler by opensearch-project.

the class JobSchedulerTests method testSchedule_disabledJob.

public void testSchedule_disabledJob() {
    ScheduledJobParameter jobParameter = buildScheduledJobParameter("job-id", "dummy job name", Instant.now().minus(1, ChronoUnit.HOURS), Instant.now(), new CronSchedule("* * * * *", ZoneId.systemDefault()), false);
    boolean scheduled = this.scheduler.schedule("index-name", "job-id", jobParameter, null, dummyVersion, jitterLimit);
    Assert.assertFalse(scheduled);
}
Also used : ScheduledJobParameter(org.opensearch.jobscheduler.spi.ScheduledJobParameter) CronSchedule(org.opensearch.jobscheduler.spi.schedule.CronSchedule)

Aggregations

ScheduledJobParameter (org.opensearch.jobscheduler.spi.ScheduledJobParameter)1 CronSchedule (org.opensearch.jobscheduler.spi.schedule.CronSchedule)1