Examples of JobKey


Examples of org.quartz.JobKey

        try {
            jobInstanceLoader.registerJob(report);

            scheduler.getScheduler().triggerJob(
                    new JobKey(JobInstanceLoader.getJobName(report), Scheduler.DEFAULT_GROUP));

            auditManager.audit(Category.report, ReportSubCategory.execute, Result.success,
                    "Successfully started execution for report: " + report.getId());
        } catch (Exception e) {
            LOG.error("While executing report {}", report, e);
View Full Code Here

Examples of org.quartz.JobKey

                    JobDataMap map = new JobDataMap();
                    map.put(AbstractTaskJob.DRY_RUN_JOBDETAIL_KEY, dryRun);

                    scheduler.getScheduler().triggerJob(
                            new JobKey(JobInstanceLoader.getJobName(task), Scheduler.DEFAULT_GROUP), map);
                } catch (Exception e) {
                    LOG.error("While executing task {}", task, e);

                    auditManager.audit(Category.task, TaskSubCategory.execute, Result.failure,
                            "Could not start execution for task: " + task.getId() + "/" + taskUtil, e);
View Full Code Here

Examples of org.quartz.JobKey

            }
        }
    }

    public void deleteRouteJob(Action action, ScheduledRouteDetails scheduledRouteDetails) throws SchedulerException {
        JobKey jobKey = retrieveJobKey(action, scheduledRouteDetails);
       
        if (!getScheduler().isShutdown()) {
            getScheduler().deleteJob(jobKey);
        }
View Full Code Here

Examples of org.quartz.JobKey

       
        return result;
    }
   
    public JobKey retrieveJobKey(Action action, ScheduledRouteDetails scheduledRouteDetails) {
        JobKey result = null;

        if (action == Action.START) {
            result = scheduledRouteDetails.getStartJobKey();
        } else if (action == Action.STOP) {
            result = scheduledRouteDetails.getStopJobKey();
View Full Code Here

Examples of org.quartz.JobKey

    }

    @Override
    public void registerNewJob(Class<? extends Job> jobClass)
    {
        JobKey jobKey = createJobKey(jobClass);

        try
        {
            Scheduled scheduled = jobClass.getAnnotation(Scheduled.class);
View Full Code Here

Examples of org.quartz.JobKey

    @Override
    public boolean isExecutingJob(Class<? extends Job> jobClass)
    {
        try
        {
            JobKey jobKey = createJobKey(jobClass);
            JobDetail jobDetail = this.scheduler.getJobDetail(jobKey);

            if (jobDetail == null)
            {
                return false;
            }

            for (JobExecutionContext jobExecutionContext : this.scheduler.getCurrentlyExecutingJobs())
            {
                if (jobKey.equals(jobExecutionContext.getJobDetail().getKey()))
                {
                    return true;
                }
            }
View Full Code Here

Examples of org.quartz.JobKey

        String groupName = scheduled.group().getSimpleName();
        String jobName = jobClass.getSimpleName();

        if (!Scheduled.class.getSimpleName().equals(groupName))
        {
            return new JobKey(jobName, groupName);
        }
        return new JobKey(jobName);
    }
View Full Code Here

Examples of org.quartz.JobKey

      result.setFailed(SCHEDULER_TRAINING_IS_NULL);
    }else{
      if(process_id==null){
        result.setFailed(PRODUCT_REQUIRE_ID);
      }else{
        JobKey jobKey = JobKey.jobKey(process_id);
        JobDetail job = null;
        try {
          if(SchedulerProvider.scheduler_train.checkExists(jobKey)){
            job = SchedulerProvider.scheduler_train.getJobDetail(jobKey);
          }else{
View Full Code Here

Examples of org.quartz.JobKey

      result.setFailed(SCHEDULER_TRAINING_IS_NULL);
    }else{
      if(process_id==null){
        result.setFailed(PRODUCT_REQUIRE_ID);
      }else{
        JobKey jobKey = JobKey.jobKey(process_id);
        JobDetail job = null;
        try {
          if(SchedulerProvider.scheduler_train.checkExists(jobKey)){
            job = SchedulerProvider.scheduler_train.getJobDetail(jobKey);
          }else{
View Full Code Here

Examples of org.quartz.JobKey

    }

    private void unregisterJob(final String jobName) {
        try {
            scheduler.getScheduler().unscheduleJob(new TriggerKey(jobName, Scheduler.DEFAULT_GROUP));
            scheduler.getScheduler().deleteJob(new JobKey(jobName, Scheduler.DEFAULT_GROUP));
        } catch (SchedulerException e) {
            LOG.error("Could not remove job " + jobName, e);
        }

        if (ApplicationContextProvider.getBeanFactory().containsSingleton(jobName)) {
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.