Interface CronJobHistoryService

All Known Implementing Classes:
DefaultCronJobHistoryService

public interface CronJobHistoryService
Convenient service for getting all historical information such as: start time, finish date, progress etc. related to CronJobModel.
Since:
6.4
Spring Bean ID:
cronJobHistoryService
  • Method Details

    • getCronJobHistoryBy

      List<CronJobHistoryModel> getCronJobHistoryBy(String cronJobCode)
      Parameters:
      cronJobCode - given cron job code
      Returns:
      matching cron job history entry for given cron job code.
    • getCronJobHistoryBy

      List<CronJobHistoryModel> getCronJobHistoryBy(List<String> cronJobCodes)
      Parameters:
      cronJobCodes - given cron job codes
      Returns:
      matching cron job history entries for given cron job code.
    • getCronJobHistoryBy

      List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, JobModel jobModel)
      Returns cron job history entries triggered by given user for given job.
      Parameters:
      userModel - given user model
      jobModel - given job model
      Returns:
      matching cron job history entries
    • getCronJobHistoryBy

      List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, String jobItemType, Date startDate, Date finishDate)
      Returns cron job history entries triggered by given user for given job type and time range. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.
      Parameters:
      userModel - given user model
      jobItemType - given job item type - for limit the results to this type only please use following syntax 'SyncItemJob!'.
      startDate - desired time date
      finishDate - desired finish date
      Returns:
      matching cron job history entries
    • getCronJobHistoryBy

      List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, String jobItemType, Date startDate, Date finishDate, CronJobStatus theStatus)
      Returns cron job history entries triggered by given user for given job type and time range and the cron job's status. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.
      Parameters:
      userModel - given user model
      jobItemType - given job item type - for limit the results to this type only please use following syntax e.g. 'SyncItemJob!'.
      startDate - desired time date
      finishDate - desired finish date
      theStatus - desired cron job status
      Returns:
      matching cron job history entries
    • getCronJobHistoryBy

      List<CronJobHistoryModel> getCronJobHistoryBy(Set<CronJobHistoryInclude> includes, UserModel userModel, Date startDate, Date finishDate, CronJobStatus theStatus)
      Returns list of CronJobHistoryModel where for every include criteria entries matching given user, startDate, finishDate and status are returned. Result of all includes in combined into one Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.
      Parameters:
      includes - set of search criteria which allow to specify cronJob's type code, job's type code and list of job's codes.
      userModel - given user model
      startDate - given start date
      finishDate - given finish date
      theStatus - given cron job's status
      Returns:
      a CronJobHistoryModel
    • getCronJobHistoryBy

      List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, String jobItemType, Date startDate, Date finishDate, CronJobResult theResult)
      Returns cron job history entries triggered by given user for given job type and time range and the cron job's result. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.
      Parameters:
      userModel - given user model
      jobItemType - given job item type - for limit the results to this type only please use following syntax e.g. 'SyncItemJob!'.
      startDate - desired time date
      finishDate - desired finish date
      theResult - desired cron job result
      Returns:
      matching cron job history entries
    • getAverageExecutionTime

      Long getAverageExecutionTime(UserModel userModel, String jobCode, TimeUnit timeUnit)
      Returns average execution time based on historical data.
      Parameters:
      userModel - given user model
      jobCode - code of job to get data for
      timeUnit - time unit to return
      Returns:
      average execution time in given time unit or null if no data is available
    • getAverageExecutionTime

      default Long getAverageExecutionTime(CronJobModel cronJob, TimeUnit timeUnit)
      Returns average execution time based on historical data.
      Parameters:
      cronJob - cronJob to get data for
      timeUnit - time unit to return
      Returns:
      average execution time in given time unit or null if no data is available