package com.inspect.job.service;

import com.inspect.base.core.exception.job.TaskException;
import com.inspect.job.domain.SysJob;

import java.util.List;

import org.quartz.SchedulerException;

public interface ISysJobService {
    List<SysJob> selectJobList(SysJob sysJob);

    SysJob selectJobById(Long id);

    int pauseJob(SysJob sysJob) throws SchedulerException;

    int resumeJob(SysJob sysJob) throws SchedulerException;

    int deleteJob(SysJob sysJob) throws SchedulerException;

    void deleteJobByIds(Long[] ids) throws SchedulerException;

    int changeStatus(SysJob sysJob) throws SchedulerException;

    void run(SysJob sysJob) throws SchedulerException;

    int insertJob(SysJob sysJob) throws SchedulerException, TaskException;

    int updateJob(SysJob sysJob) throws SchedulerException, TaskException;

    boolean checkCronExpressionIsValid(String cronExpression);
}
