Examples of JobKey


Examples of org.quartz.JobKey

        try
        {
            if ( jobExists( jobName, groupName ) )
            {
                scheduler.deleteJob( new JobKey( jobName, groupName ) );
            }
        }
        catch ( SchedulerException e )
        {
            throw new SchedulerException( "Error unscheduling job.", e );
View Full Code Here

Examples of org.quartz.JobKey

    public boolean interruptSchedule( String jobName, String groupName )
        throws SchedulerException
    {
        try
        {
            return scheduler.interrupt( new JobKey( jobName, groupName ) );
        }
        catch ( Exception e )
        {
            throw new SchedulerException( "Can't interrup job \"" + jobName + "\".", e );
        }
View Full Code Here

Examples of org.quartz.JobKey

    private boolean jobExists( String jobName, String jobGroup )
        throws SchedulerException
    {

        return jobExists( new JobKey( jobName, jobGroup ) );
    }
View Full Code Here

Examples of org.quartz.JobKey

            Set jobsInGroup = getScheduler().getJobKeys(GroupMatcher.groupEquals(jobGroup));
            getLogger().info("Job Group: " + jobGroup + " contains the following number of jobs : " + jobsInGroup.size());
            for (Iterator j = jobsInGroup.iterator(); j.hasNext();)
            {
                StringBuffer buffer = new StringBuffer();
                JobKey jobKey = (JobKey)j.next();
                JobDetail jobDetail = getScheduler().getJobDetail(jobKey);
                List jobTriggers = getScheduler().getTriggersOfJob(jobKey);
                buffer.append(jobDetail.getKey());
                buffer.append(" => ");
                if(jobTriggers != null && !jobTriggers.isEmpty())
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

    }

    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

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

Examples of org.quartz.JobKey

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        Preconditions.checkNotNull(context, "Context is not set");

        JobDetail jobDetail = context.getJobDetail();
        JobKey jobKey = jobDetail.getKey();

        LOGGER.debug("Quartz job [name={}, group={}] is fired", jobKey.getName(), jobKey.getGroup());

        if (!QzerverKeyUtils.isQzerverJob(jobKey)) {
            LOGGER.warn("Unknown job [name={}, group={}] is fired", jobKey.getName(), jobKey.getGroup());
            return;
        }

        ScheduleJobExecutorService executorService =
            (ScheduleJobExecutorService) context.get(QzerverJobListener.SERVICE_NAME);
View Full Code Here

Examples of org.quartz.JobKey

        }
    }

    @Override
    public void createJob(long jobId, String cron, String timeZoneId, boolean enabled) {
        JobKey jobKey = QzerverKeyUtils.jobKey(jobId);

        JobDetail jobDetail = JobBuilder.newJob()
                .withIdentity(jobKey)
                .storeDurably(true)
                .requestRecovery(false)
View Full Code Here

Examples of org.quartz.JobKey

        }
    }

    @Override
    public void deleteJob(long jobId) {
        JobKey jobKey = QzerverKeyUtils.jobKey(jobId);

        try {
            scheduler.deleteJob(jobKey);
        } catch (SchedulerException e) {
            throw new SystemIntegrityException("Fail to delete quartz job", 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.