Package org.pentaho.platform.api.scheduler2

Examples of org.pentaho.platform.api.scheduler2.IScheduler.createJob()


    IScheduler scheduler = PentahoSystem.get( IScheduler.class, "IScheduler2", null ); //$NON-NLS-1$
    JobTrigger trigger = new SimpleJobTrigger( new Date(), null, -1, intervalInSeconds );

    jobMap.put( "transFileName", getTransFileName() );
    scheduler.createJob( GatherStatsListener.JOB_NAME, GatherStatsAction.class, jobMap, trigger );
    logger.info( "Statistics gathering jop has been scheduled." );
  }

  /*
   * protected Class<?> resolveClass(String className) throws PluginBeanException {
View Full Code Here


    deleteJobIfNecessary();

    Map<String, Serializable> parms = new HashMap<String, Serializable>();
    parms.put( VersionCheckerAction.VERSION_REQUEST_FLAGS, new Integer( versionRequestFlags ) );
    JobTrigger trigger = new SimpleJobTrigger( new Date(), null, -1, repeatSeconds );
    scheduler.createJob( EmbeddedVersionCheckSystemListener.VERSION_CHECK_JOBNAME, VersionCheckerAction.class, parms,
        trigger );
  }

  protected void deleteJobIfNecessary() throws SchedulerException {
    IScheduler scheduler = PentahoSystem.get( IScheduler.class, "IScheduler2", null ); //$NON-NLS-1$
View Full Code Here

    Job job = null;
    try {
      IScheduler scheduler = PentahoSystem.get( IScheduler.class, "IScheduler2", null ); //$NON-NLS-1$
      Map<String, Serializable> properJobParams = toProperMap( jobParams );
      job = scheduler.createJob( jobName, getDefaultActionId(), properJobParams, trigger );
    } catch ( SchedulerException e ) {
      logger.error( e.getMessage(), e ); // temporary error logging.. this needs to become an aspect
      throw e;
    }
    return job.getJobId();
View Full Code Here

                streamProvider.setStreamingAction( null ); // remove generated content 
              }
              QuartzJobKey jobKey = QuartzJobKey.parse( context.getJobDetail().getName() );
              String jobName = jobKey.getJobName();
              jobParams.put( QuartzScheduler.RESERVEDMAPKEY_RESTART_FLAG, Boolean.TRUE );
              scheduler.createJob( jobName, iaction, jobParams, trigger, streamProvider );
              log.warn( "New RunOnce job created for " + jobName + " -> possible startup synchronization error" );
              return null;
            }
          } );
        } else {
View Full Code Here

          public Void call() throws Exception {
            streamProvider.setStreamingAction( null ); // remove generated content
            QuartzJobKey jobKey = QuartzJobKey.parse( context.getJobDetail().getName() );
            String jobName = jobKey.getJobName();
            org.pentaho.platform.api.scheduler2.Job j =
                scheduler.createJob( jobName, iaction, jobParams, trigger, streamProvider );
            log.warn( "New Job: " + j.getJobId() + " created" );
            return null;
          }
        } );
      } catch ( Exception e ) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.