code: public Runnable function() {
          return new Runnable() {
              @Override
              public void run() {
                  try {
                      method.invoke(scheduled);
                  } catch (IllegalAccessException e) {
                      WisdomTaskScheduler.getLogger().error("Error while accessing to the scheduled method {}.{}",
                              scheduled.getClass().getName(), method.getName(), e);
                  } catch (InvocationTargetException e) {
                      WisdomTaskScheduler.getLogger().error("Error in scheduled method {}.{}",
                              scheduled.getClass().getName(), method.getName(), e);
                  }
              }
          };
      }
docs: Gets the runnable invoking the scheduled method.
  
  @return the runnable.