All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.turbospaces.quartz.ScheduledJob Maven / Gradle / Ivy

There is a newer version: 2.0.33
Show newest version
package com.turbospaces.quartz;

import java.time.Duration;
import java.util.function.Supplier;

import org.apache.commons.lang3.time.StopWatch;
import org.quartz.Job;
import org.quartz.JobBuilder;

import reactor.core.publisher.Mono;

public interface ScheduledJob extends Job {
    Supplier isEnabled();
    JobBuilder toJob();
    void schedule() throws Exception;
    Mono runOnce() throws Exception;
    default void runOnceBlocking() throws Exception {
        runOnce().block(Duration.ofSeconds(30));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy