package cc.smtweb.framework.core.mvc.scheduler;

import com.serotonin.timer.FixedRateTrigger;
import com.serotonin.timer.TimerTask;

public class FixedTimerTask extends TimerTask {
    private final Runnable job;

    //  new TimerTask(new FixedRateTrigger(30, 60)), result.redisJobManager
    public FixedTimerTask(int delay, int period, Runnable job) {
        super(new FixedRateTrigger(delay, period));
        this.job = job;
    }

    @Override
    public void run(long runtime) {
        job.run();
    }
}
