public synchronized void runNow(String scheduledJobId) {
    ScheduledJob scheduledJob = getJob(scheduledJobId);

    try {
      JobKey jobKey = new JobKey(scheduledJobId, SCHEDULED_JOB_GROUP);
      if (quartzScheduler.checkExists(jobKey)) {
        // Run job now
        quartzScheduler.triggerJob(jobKey);
      } else {
        // Schedule with 'now' trigger
        Trigger trigger =
            newTrigger().withIdentity(scheduledJobId, SCHEDULED_JOB_GROUP).startNow().build();
        schedule(scheduledJob, trigger);
      }
    } catch (SchedulerException e) {
      LOG.error("Error runNow ScheduledJob", e);
      throw new MolgenisDataException("Error job runNow", e);
    }
  }
public synchronized void runNow ( String scheduledJobId ) { ScheduledJob scheduledJob = getJob ( scheduledJobId ) ; try { JobKey jobKey = new JobKey ( scheduledJobId , SCHEDULED_JOB_GROUP ) ; if ( quartzScheduler . checkExists ( jobKey ) ) { quartzScheduler . triggerJob ( jobKey ) ; } else { Trigger trigger = newTrigger ( ) . withIdentity ( scheduledJobId , SCHEDULED_JOB_GROUP ) . startNow ( ) . build ( ) ; schedule ( scheduledJob , trigger ) ; } } catch ( SchedulerException e ) { LOG . error ( "Error runNow ScheduledJob" , e ) ; throw new MolgenisDataException ( "Error job runNow" , e ) ; } }
Executes a {@link ScheduledJob} immediately.

@param scheduledJobId ID of the {@link ScheduledJob} to run