code: @Override
      public Date getNextExecutionTime(long taskId) throws Exception {
          TaskRecord taskRecord = null;
          TransactionController tranController = new TransactionController();
          try {
              tranController.preInvoke();
              taskRecord = taskStore.getNextExecutionTime(taskId, null);
          } catch (Throwable x) {
              tranController.setFailure(x);
          } finally {
              Exception x = tranController.postInvoke(Exception.class);
              if (x != null)
                  throw x;
          }
          return taskRecord == null || (taskRecord.getState() & TaskState.ENDED.bit) != 0 ? null : new Date(taskRecord.getNextExecutionTime());
      }
docs: {@inheritDoc}