code: public Trigger getSimpleTrigger(TimeUnit timeUnit, int timeInterval) {
      SimpleScheduleBuilder simpleScheduleBuilder = null;
      simpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule();
  
      switch (timeUnit) {
      case MILLISECONDS:
        simpleScheduleBuilder.withIntervalInMilliseconds(timeInterval).repeatForever();
        break;
      case SECONDS:
        simpleScheduleBuilder.withIntervalInSeconds(timeInterval).repeatForever();
        break;
      case MINUTES:
        simpleScheduleBuilder.withIntervalInMinutes(timeInterval).repeatForever();
        break;
      case HOURS:
        simpleScheduleBuilder.withIntervalInHours(timeInterval).repeatForever();
        break;
      case DAYS:
        simpleScheduleBuilder.withIntervalInHours(timeInterval * 24).repeatForever();
        break;
      default:
        simpleScheduleBuilder.withIntervalInSeconds(1).repeatForever(); //default 1 sec
      }
      Trigger simpleTrigger = TriggerBuilder.newTrigger().withSchedule(simpleScheduleBuilder).build();
      return simpleTrigger;
    }
docs: Gets the simple trigger.
  
  @param timeUnit the time unit
  @param timeInterval the time interval
  @return the simple trigger