Pause the job with given name in given group

@param jobName
the job name

@param jobGroupName
the job group name

@return <code>true</code> if job was paused, <code>false</code> otherwise

@see QuartzService#pauseQuartzJob(String, String)
344519
public boolean pauseQuartzJob(String jobName, String jobGroupName) {
        try {
            this.scheduler.pauseJob(new JobKey(jobName, jobGroupName));
            return true;
        } catch (SchedulerException e) {
            logger.error("error pausing job: " + jobName + " in group: " + jobGroupName, e);
        }
        return false;
    }
1119291
public List<QuartzJobInfo> getJobs() {
        List<QuartzJobInfo> jobs = new ArrayList<QuartzJobInfo>();
        try {
            List<String> jobGroupNames = this.scheduler.getJobGroupNames();

            List<JobExecutionContext> runningJobs = this.scheduler.getCurrentlyExecutingJobs();

            for (String jobGroupName : jobGroupNames) {
                final Set<JobKey> jobKeys = this.scheduler.getJobKeys(GroupMatcher.jobGroupEquals(jobGroupName));

                for (JobKey jobKey : jobKeys) {
                    // TODO: Find a better solution to return other details of the jobs.
                    // Because getJobDetail tries to instantiate the class of the type that is specified in the
                    // data store. Hence, we only return a list of job names and groups.
                    // JobDetail jobDetail = scheduler.getJobDetail(jobName, jobGroupName);

                    QuartzJobInfo jobInfo = new QuartzJobInfo();
                    jobInfo.setJobName(jobKey.getName());
                    jobInfo.setJobGroupName(jobGroupName);

                    @SuppressWarnings("unchecked")
                    List<Trigger> triggers = (List<Trigger>) this.scheduler.getTriggersOfJob(jobKey);

                    if (AssertUtils.isNotEmpty(triggers)) {
                        for (Trigger trigger : triggers) {
                            QuartzJobTriggerInfo triggerInfo = new QuartzJobTriggerInfo();

                            String triggerName = trigger.getKey().getName();
                            String triggerGroup = trigger.getKey().getGroup();
                            triggerInfo.setTriggerName(triggerName);
                            triggerInfo.setTriggerGroup(triggerGroup);
                            triggerInfo.setLastFireTime(trigger.getPreviousFireTime());
                            triggerInfo.setNextFireTime(trigger.getNextFireTime());

                            triggerInfo.setStatus(this.scheduler.getTriggerState(trigger.getKey()));

                            // check if the trigger is already running
                            for (JobExecutionContext jec : runningJobs) {
                                if (jec.getTrigger().equals(trigger)) {
                                    triggerInfo.setRunning(true);
                                    triggerInfo.setRunTime(jec.getJobRunTime());
                                    break;
                                }
                            }

                            jobInfo.addTriggerInfo(triggerInfo);
                        }
                    }

                    // jobInfo.setDescription(jobDetail.getDescription());
                    jobs.add(jobInfo);
                }
            }
            return jobs;
        } catch (SchedulerException e) {
            logger.error("error getting scheduled job info", e);
        }
        return null;
    }
1002450
@Override
	public void executeJob(String groupName, String jobName) throws SchedulerException {
		if (!config.isExecuteJobAllowed()) {
			LOGGER.warn("not allowed to execute any job");
			return;
		}
		scheduler.triggerJob(new JobKey(jobName, groupName));
	}
206330
public OperationFuture<List<Server>> pause(Group... groups) {
        return serverService().pause(
            getServerSearchCriteria(groups)
        );
    }
364745
public Response deleteGroup(String groupName) {
		return restClient.delete("groups/" + groupName, new HashMap<String, String>());
	}
895956
@Override
	public boolean removeTrigger(String groupName, String jobName, final String triggerGroup, final String triggerName) throws SchedulerException {
		if (!config.isRemoveTriggerAllowed()) {
			LOGGER.warn("not allowed to remove any trigger");
			return false;
		}
		Trigger triggerFound = findTrigger(groupName, jobName, triggerGroup, triggerName);
		if (null != triggerFound) {
			return scheduler.unscheduleJob(triggerFound.getKey());
		}
		return false;
	}
1274984
public boolean insertGroup(String name)
	{
		if (isGroupExist(name))
		{
			throw new SystemException(String.format("Group '%s' already exist.", name));
		}

		return allGroups.add(name);
	}
402057
public boolean isScheduled(final org.easybatch.core.job.Job job) throws JobSchedulerException {
        String jobName = job.getName();
        try {
            return scheduler.checkExists(TriggerKey.triggerKey(TRIGGER_NAME_PREFIX + jobName));
        } catch (SchedulerException e) {
            throw new JobSchedulerException(format("Unable to check if the job '%s' is scheduled", jobName), e);
        }
    }
1310928
@Override
	public void interruptJob(String jobGroup, String jobName) throws SchedulerException {
		if (!config.isInterruptJobAllowed()) {
			LOGGER.warn("not allowed to interrupt any job");
			return;
		}
		JobKey jobKey = new JobKey(jobName, jobGroup);
		if (isInteruptable(jobKey)) {
			List<JobExecutionContext> executingJobs = scheduler.getCurrentlyExecutingJobs();
			JobDetail jobDetail = scheduler.getJobDetail(jobKey);
			for (JobExecutionContext jobExecutionContext : executingJobs) {
				JobDetail execJobDetail = jobExecutionContext.getJobDetail();
				if (execJobDetail.getKey().equals(jobDetail.getKey())) {
					if (LOGGER.isDebugEnabled())
						LOGGER.debug(String.format("interrupting job (%s, %s)", jobDetail.getKey().getGroup(),
								jobDetail.getKey().getName()));
					((InterruptableJob) jobExecutionContext.getJobInstance()).interrupt();
				}
			}
		}
	}
277583
@Override
    public boolean isValidGroup(String groupSecurityName) throws RegistryException {
        if (groupSecurityName == null) {
            throw new IllegalArgumentException("groupSecurityName is null");
        }
        if (groupSecurityName.isEmpty()) {
            throw new IllegalArgumentException("groupSecurityName is an empty String");
        }
        return false;
    }
774981
public void addRoleForGroup(String groupName, String roleName) {
        if (workgroups==null) {
            workgroups = new Workgroup[1];
            workgroups[0] = new Workgroup(null, groupName, null);
        }
        List<String> roles = workgroups[0].getRoles();
        if (roles==null) {
            roles = new ArrayList<String>();
            workgroups[0].setRoles(roles);
        }
        roles.add(roleName);
    }
570686
public void pause(String queueName) {
        try {
            getQueueControl(queueName).pause();
        } catch (Exception e) {
            throw new AsyncException(e);
        }
    }
44284
public void delete(String job, Map<String, String> groupingKey) throws IOException {
    doRequest(null, job, groupingKey, "DELETE");
  }
889389
public void pauseTriggers (final GroupMatcher <TriggerKey> matcher) throws SchedulerException
  {
    validateState ();

    final ICommonsCollection <String> pausedGroups = m_aResources.getJobStore ()
                                                                 .pauseTriggers (_getOrDefault (matcher));
    notifySchedulerThread (0L);
    for (final String pausedGroup : pausedGroups)
    {
      notifySchedulerListenersPausedTriggers (pausedGroup);
    }
  }
220856
public static boolean isDao(String groupName) {
        try {
            return GroupRouter.singleton.newestDefinition(groupName).isDao();
        } catch (GroupUndefinedException e) {
            throw new RuntimeException("Call GroupJudge.defined() first.", e);
        }
    }
1134413
public Group getGroup(String groupName) {
        Group result = null;
        for (Group item : getGroupsList()) {
            if (item.getName().equals(groupName)) {
                result = item;
            }
        }
        return result;
    }
959882
public String group(String groupName) {
        int idx = groupIndex(groupName);
        if (idx < 0) {
          throw new IndexOutOfBoundsException("No group \"" + groupName + "\"");
        }
        return group(idx);
    }