当前位置: 首页>>代码示例>>Java>>正文


Java SimpleTrigger.setStartTime方法代码示例

本文整理汇总了Java中org.quartz.SimpleTrigger.setStartTime方法的典型用法代码示例。如果您正苦于以下问题:Java SimpleTrigger.setStartTime方法的具体用法?Java SimpleTrigger.setStartTime怎么用?Java SimpleTrigger.setStartTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.quartz.SimpleTrigger的用法示例。


在下文中一共展示了SimpleTrigger.setStartTime方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildIndexHtml

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
public void buildIndexHtml() {
	try {
		SimpleTrigger simpleTrigger = new SimpleTrigger();
		simpleTrigger.setName(BuildIndexHtmlJob.TRIGGER_NAME);
		simpleTrigger.setGroup(BuildIndexHtmlJob.GROUP_NAME);
		simpleTrigger.setJobName(BuildIndexHtmlJob.JOB_NAME);
		simpleTrigger.setJobGroup(BuildIndexHtmlJob.GROUP_NAME);
		simpleTrigger.setStartTime(DateUtils.addSeconds(new Date(), SettingUtil.getSetting().getBuildHtmlDelayTime()));
		simpleTrigger.setRepeatCount(0);
		simpleTrigger.setRepeatInterval(60);
		
		JobDetail jobDetail = scheduler.getJobDetail(BuildIndexHtmlJob.JOB_NAME, BuildIndexHtmlJob.GROUP_NAME);
		if (jobDetail != null) {
			scheduler.rescheduleJob(BuildIndexHtmlJob.TRIGGER_NAME, BuildIndexHtmlJob.GROUP_NAME, simpleTrigger);
		} else {
			jobDetail = new JobDetail(BuildIndexHtmlJob.JOB_NAME, BuildIndexHtmlJob.GROUP_NAME, BuildIndexHtmlJob.class);
			scheduler.scheduleJob(jobDetail, simpleTrigger);
		}
		
		if (scheduler.isShutdown()) {
			scheduler.start();
		}
	} catch (SchedulerException e) {
		e.printStackTrace();
	}
}
 
开发者ID:wangko27,项目名称:SelfSoftShop,代码行数:27,代码来源:JobServiceImpl.java

示例2: buildLoginHtml

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
public void buildLoginHtml() {
	try {
		SimpleTrigger simpleTrigger = new SimpleTrigger();
		simpleTrigger.setName(BuildLoginHtmlJob.TRIGGER_NAME);
		simpleTrigger.setGroup(BuildLoginHtmlJob.GROUP_NAME);
		simpleTrigger.setJobName(BuildLoginHtmlJob.JOB_NAME);
		simpleTrigger.setJobGroup(BuildLoginHtmlJob.GROUP_NAME);
		simpleTrigger.setStartTime(DateUtils.addSeconds(new Date(), SettingUtil.getSetting().getBuildHtmlDelayTime()));
		simpleTrigger.setRepeatCount(0);
		simpleTrigger.setRepeatInterval(60);
		
		JobDetail jobDetail = scheduler.getJobDetail(BuildLoginHtmlJob.JOB_NAME, BuildLoginHtmlJob.GROUP_NAME);
		if (jobDetail != null) {
			scheduler.rescheduleJob(BuildLoginHtmlJob.TRIGGER_NAME, BuildLoginHtmlJob.GROUP_NAME, simpleTrigger);
		} else {
			jobDetail = new JobDetail(BuildLoginHtmlJob.JOB_NAME, BuildLoginHtmlJob.GROUP_NAME, BuildLoginHtmlJob.class);
			scheduler.scheduleJob(jobDetail, simpleTrigger);
		}
		
		if (scheduler.isShutdown()) {
			scheduler.start();
		}
	} catch (SchedulerException e) {
		e.printStackTrace();
	}
}
 
开发者ID:wangko27,项目名称:SelfSoftShop,代码行数:27,代码来源:JobServiceImpl.java

示例3: buildRegisterAgreementHtml

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
public void buildRegisterAgreementHtml() {
	try {
		SimpleTrigger simpleTrigger = new SimpleTrigger();
		simpleTrigger.setName(BuildRegisterAgreementHtmlJob.TRIGGER_NAME);
		simpleTrigger.setGroup(BuildRegisterAgreementHtmlJob.GROUP_NAME);
		simpleTrigger.setJobName(BuildRegisterAgreementHtmlJob.JOB_NAME);
		simpleTrigger.setJobGroup(BuildRegisterAgreementHtmlJob.GROUP_NAME);
		simpleTrigger.setStartTime(DateUtils.addSeconds(new Date(), SettingUtil.getSetting().getBuildHtmlDelayTime()));
		simpleTrigger.setRepeatCount(0);
		simpleTrigger.setRepeatInterval(60);
		
		JobDetail jobDetail = scheduler.getJobDetail(BuildRegisterAgreementHtmlJob.JOB_NAME, BuildRegisterAgreementHtmlJob.GROUP_NAME);
		if (jobDetail != null) {
			scheduler.rescheduleJob(BuildRegisterAgreementHtmlJob.TRIGGER_NAME, BuildRegisterAgreementHtmlJob.GROUP_NAME, simpleTrigger);
		} else {
			jobDetail = new JobDetail(BuildRegisterAgreementHtmlJob.JOB_NAME, BuildRegisterAgreementHtmlJob.GROUP_NAME, BuildRegisterAgreementHtmlJob.class);
			scheduler.scheduleJob(jobDetail, simpleTrigger);
		}
		
		if (scheduler.isShutdown()) {
			scheduler.start();
		}
	} catch (SchedulerException e) {
		e.printStackTrace();
	}
}
 
开发者ID:wangko27,项目名称:SelfSoftShop,代码行数:27,代码来源:JobServiceImpl.java

示例4: buildAdminJs

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
public void buildAdminJs() {
	try {
		SimpleTrigger simpleTrigger = new SimpleTrigger();
		simpleTrigger.setName(BuildAdminJsJob.TRIGGER_NAME);
		simpleTrigger.setGroup(BuildAdminJsJob.GROUP_NAME);
		simpleTrigger.setJobName(BuildAdminJsJob.JOB_NAME);
		simpleTrigger.setJobGroup(BuildAdminJsJob.GROUP_NAME);
		simpleTrigger.setStartTime(DateUtils.addSeconds(new Date(), SettingUtil.getSetting().getBuildHtmlDelayTime()));
		simpleTrigger.setRepeatCount(0);
		simpleTrigger.setRepeatInterval(60);
		
		JobDetail jobDetail = scheduler.getJobDetail(BuildAdminJsJob.JOB_NAME, BuildAdminJsJob.GROUP_NAME);
		if (jobDetail != null) {
			scheduler.rescheduleJob(BuildAdminJsJob.TRIGGER_NAME, BuildAdminJsJob.GROUP_NAME, simpleTrigger);
		} else {
			jobDetail = new JobDetail(BuildAdminJsJob.JOB_NAME, BuildAdminJsJob.GROUP_NAME, BuildAdminJsJob.class);
			scheduler.scheduleJob(jobDetail, simpleTrigger);
		}
		
		if (scheduler.isShutdown()) {
			scheduler.start();
		}
	} catch (SchedulerException e) {
		e.printStackTrace();
	}
}
 
开发者ID:wangko27,项目名称:SelfSoftShop,代码行数:27,代码来源:JobServiceImpl.java

示例5: buildShopJs

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
public void buildShopJs() {
	try {
		SimpleTrigger simpleTrigger = new SimpleTrigger();
		simpleTrigger.setName(BuildShopJsJob.TRIGGER_NAME);
		simpleTrigger.setGroup(BuildShopJsJob.GROUP_NAME);
		simpleTrigger.setJobName(BuildShopJsJob.JOB_NAME);
		simpleTrigger.setJobGroup(BuildShopJsJob.GROUP_NAME);
		simpleTrigger.setStartTime(DateUtils.addSeconds(new Date(), SettingUtil.getSetting().getBuildHtmlDelayTime()));
		simpleTrigger.setRepeatCount(0);
		simpleTrigger.setRepeatInterval(60);
		
		JobDetail jobDetail = scheduler.getJobDetail(BuildShopJsJob.JOB_NAME, BuildShopJsJob.GROUP_NAME);
		if (jobDetail != null) {
			scheduler.rescheduleJob(BuildShopJsJob.TRIGGER_NAME, BuildShopJsJob.GROUP_NAME, simpleTrigger);
		} else {
			jobDetail = new JobDetail(BuildShopJsJob.JOB_NAME, BuildShopJsJob.GROUP_NAME, BuildShopJsJob.class);
			scheduler.scheduleJob(jobDetail, simpleTrigger);
		}
		
		if (scheduler.isShutdown()) {
			scheduler.start();
		}
	} catch (SchedulerException e) {
		e.printStackTrace();
	}
}
 
开发者ID:wangko27,项目名称:SelfSoftShop,代码行数:27,代码来源:JobServiceImpl.java

示例6: buildErrorHtml

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
public void buildErrorHtml() {
	try {
		SimpleTrigger simpleTrigger = new SimpleTrigger();
		simpleTrigger.setName(BuildErrorHtmlJob.TRIGGER_NAME);
		simpleTrigger.setGroup(BuildErrorHtmlJob.GROUP_NAME);
		simpleTrigger.setJobName(BuildErrorHtmlJob.JOB_NAME);
		simpleTrigger.setJobGroup(BuildErrorHtmlJob.GROUP_NAME);
		simpleTrigger.setStartTime(DateUtils.addSeconds(new Date(), SettingUtil.getSetting().getBuildHtmlDelayTime()));
		simpleTrigger.setRepeatCount(0);
		simpleTrigger.setRepeatInterval(60);
		
		JobDetail jobDetail = scheduler.getJobDetail(BuildErrorHtmlJob.JOB_NAME, BuildErrorHtmlJob.GROUP_NAME);
		if (jobDetail != null) {
			scheduler.rescheduleJob(BuildErrorHtmlJob.TRIGGER_NAME, BuildErrorHtmlJob.GROUP_NAME, simpleTrigger);
		} else {
			jobDetail = new JobDetail(BuildErrorHtmlJob.JOB_NAME, BuildErrorHtmlJob.GROUP_NAME, BuildErrorHtmlJob.class);
			scheduler.scheduleJob(jobDetail, simpleTrigger);
		}
		
		if (scheduler.isShutdown()) {
			scheduler.start();
		}
	} catch (SchedulerException e) {
		e.printStackTrace();
	}
}
 
开发者ID:wangko27,项目名称:SelfSoftShop,代码行数:27,代码来源:JobServiceImpl.java

示例7: deleteProjectDetailJob

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
/**
 * Job to delete project details
 *
 * @author Adelina
 * 
 * @throws SchedulerException
 */
private void deleteProjectDetailJob() throws SchedulerException {
	logger.debug("deleteProjectDetailJob - START-");
	
	final String myJob = "DeleteProjectDetailJob";
	
	Scheduler sched = (Scheduler)CMContext.getFromContext(IConstant.SCHEDULER);
	
	JobDetail jobDetail = new JobDetail(myJob, myJob.concat("_Group"), DeleteProjectDetailJob.class);
    
    // initiate SimpleTrigger with its name(myJob.concat("Trigger")) and group name(myJob.concat("_Group"))
    SimpleTrigger simpleTrigger = new SimpleTrigger(myJob.concat("Trigger"), myJob.concat("_Group"));
    // set its start up time - now
    simpleTrigger.setStartTime(new Date(System.currentTimeMillis()));
    // set the interval, how often the job should run (3600 second here - 60 minutes = 1h) - must be set 
    simpleTrigger.setRepeatInterval(3600000);  
    // set the number of execution of this job
    // it will run 1 time and exhaust.
    simpleTrigger.setRepeatCount(0);
    
    sched.scheduleJob(jobDetail, simpleTrigger);
	
	logger.debug("deleteProjectDetailJob - END-");
}
 
开发者ID:CodeSphere,项目名称:termitaria,代码行数:31,代码来源:InitApplication.java

示例8: deleteTeamMemberDetailJob

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
/**
 * Job to delete team member details
 *
 * @author Adelina
 * 
 * @throws SchedulerException
 */
private void deleteTeamMemberDetailJob() throws SchedulerException {
	logger.debug("deleteTeamMemberDetailJob - START-");
	
	final String myJob = "DeleteTeamMemberDetailJob";
	
	Scheduler sched = (Scheduler)CMContext.getFromContext(IConstant.SCHEDULER);
	
	JobDetail jobDetail = new JobDetail(myJob, myJob.concat("_Group"), DeleteTeamMemberDetailJob.class);
    
    // initiate SimpleTrigger with its name(myJob.concat("Trigger")) and group name(myJob.concat("_Group"))
    SimpleTrigger simpleTrigger = new SimpleTrigger(myJob.concat("Trigger"), myJob.concat("_Group"));
    // set its start up time - now
    simpleTrigger.setStartTime(new Date(System.currentTimeMillis()));
    // set the interval, how often the job should run (3600 second here - 60 minutes = 1h) - must be set 
    simpleTrigger.setRepeatInterval(3600000);  
    // set the number of execution of this job
    // it will run 1 time and exhaust.
    simpleTrigger.setRepeatCount(0);
    
    sched.scheduleJob(jobDetail, simpleTrigger);
	
	logger.debug("deleteTeamMemberDetailJob - END-");
}
 
开发者ID:CodeSphere,项目名称:termitaria,代码行数:31,代码来源:InitApplication.java

示例9: finishProjectDetailJob

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
/**
 * Creates the finish project details job
 *
 * @author Adelina
 * 
 * @throws SchedulerException
 */
private void finishProjectDetailJob() throws SchedulerException {
	logger.debug("finishProjectDetailJob - START-");
	
	final String myJob = "FinishProjectDetailJob";
	
	Scheduler sched = (Scheduler)CMContext.getFromContext(IConstant.SCHEDULER);
	
	JobDetail jobDetail = new JobDetail(myJob, myJob.concat("_Group"), FinishProjectDetailJob.class);
    
    // initiate SimpleTrigger with its name(myJob.concat("Trigger")) and group name(myJob.concat("_Group"))
    SimpleTrigger simpleTrigger = new SimpleTrigger(myJob.concat("Trigger"), myJob.concat("_Group"));
    // set its start up time - now
    simpleTrigger.setStartTime(new Date(System.currentTimeMillis()));
    // set the interval, how often the job should run (3600 second here - 60 minutes = 1h) - must be set 
    simpleTrigger.setRepeatInterval(3600000);  
    // set the number of execution of this job
    // it will run 1 time and exhaust.
    simpleTrigger.setRepeatCount(0);
    
    sched.scheduleJob(jobDetail, simpleTrigger);
	
	logger.debug("finishProjectDetailJob - END-");
}
 
开发者ID:CodeSphere,项目名称:termitaria,代码行数:31,代码来源:InitApplication.java

示例10: abortProjectDetailJob

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
/**
 * Creates the abort project details job
 *
 * @author Adelina
 * 
 * @throws SchedulerException
 */
private void abortProjectDetailJob() throws SchedulerException {
	logger.debug("abortProjectDetailJob - START-");
	
	final String myJob = "AbortProjectDetailJob";
	
	Scheduler sched = (Scheduler)CMContext.getFromContext(IConstant.SCHEDULER);
	
	JobDetail jobDetail = new JobDetail(myJob, myJob.concat("_Group"), AbortProjectDetailJob.class);
    
    // initiate SimpleTrigger with its name(myJob.concat("Trigger")) and group name(myJob.concat("_Group"))
    SimpleTrigger simpleTrigger = new SimpleTrigger(myJob.concat("Trigger"), myJob.concat("_Group"));
    // set its start up time - now
    simpleTrigger.setStartTime(new Date(System.currentTimeMillis()));
    // set the interval, how often the job should run (3600 second here - 60 minutes = 1h) - must be set 
    simpleTrigger.setRepeatInterval(3600000);  
    // set the number of execution of this job
    // it will run 1 time and exhaust.
    simpleTrigger.setRepeatCount(0);
    
    sched.scheduleJob(jobDetail, simpleTrigger);
	
	logger.debug("abortProjectDetailJob - END-");
}
 
开发者ID:CodeSphere,项目名称:termitaria,代码行数:31,代码来源:InitApplication.java

示例11: openProjectDetailJob

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
/**
 * Creates the open project details job
 *
 * @author Adelina
 * 
 * @throws SchedulerException
 */
private void openProjectDetailJob() throws SchedulerException {
	logger.debug("openProjectDetailJob - START-");
	
	final String myJob = "OpenProjectDetailJob";
	
	Scheduler sched = (Scheduler)CMContext.getFromContext(IConstant.SCHEDULER);
	
	JobDetail jobDetail = new JobDetail(myJob, myJob.concat("_Group"), OpenProjectDetailJob.class);
    
    // initiate SimpleTrigger with its name(myJob.concat("Trigger")) and group name(myJob.concat("_Group"))
    SimpleTrigger simpleTrigger = new SimpleTrigger(myJob.concat("Trigger"), myJob.concat("_Group"));
    // set its start up time - now
    simpleTrigger.setStartTime(new Date(System.currentTimeMillis()));
    // set the interval, how often the job should run (3600 second here - 60 minutes = 1h) - must be set 
    simpleTrigger.setRepeatInterval(3600000);  
    // set the number of execution of this job
    // it will run 1 time and exhaust.
    simpleTrigger.setRepeatCount(0);
    
    sched.scheduleJob(jobDetail, simpleTrigger);
	
	logger.debug("openProjectDetailJob - END-");
}
 
开发者ID:CodeSphere,项目名称:termitaria,代码行数:31,代码来源:InitApplication.java

示例12: manageTrial

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
/**
 * Creates the trial period job
 *
 * @author alu
 * @throws SchedulerException
 */
private void manageTrial() throws SchedulerException {
	logger.debug("mannageTrial - START-");
	
	final String myJob = "TrialJob";
	
	Scheduler sched = (Scheduler)OMContext.getFromContext(IConstant.SCHEDULER);
	
	JobDetail jobDetail = new JobDetail(myJob, myJob.concat("_Group"), TrialJob.class);
    
    // initiate SimpleTrigger with its name(myJob.concat("Trigger")) and group name(myJob.concat("_Group"))
    SimpleTrigger simpleTrigger = new SimpleTrigger(myJob.concat("Trigger"), myJob.concat("_Group"));
    // set its start up time - 15 minutes from now
    simpleTrigger.setStartTime(new Date(System.currentTimeMillis()));
    // set the interval, how often the job should run (900 second here - 15 minutes) - must be set 
    simpleTrigger.setRepeatInterval(900000);
    // set the number of execution of this job
    // it will run 10000 time and exhaust.
    simpleTrigger.setRepeatCount(50000);
    
    sched.scheduleJob(jobDetail, simpleTrigger);
	
	logger.debug("manageTrial - END-");
}
 
开发者ID:CodeSphere,项目名称:termitaria,代码行数:30,代码来源:InitApplication.java

示例13: getTrigger

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
@Override
public Trigger getTrigger() throws Exception
{
    if ((repeatInterval <= 0) && (repeatCount != 0))
    {
       logger.error("Job "+getBeanName()+" - repeatInterval/repeatIntervalMinutes cannot be 0 (or -ve) unless repeatCount is also 0");
       return null;
    }
    
    SimpleTrigger trigger = new SimpleTrigger(getBeanName(), Scheduler.DEFAULT_GROUP);
    trigger.setStartTime(new Date(System.currentTimeMillis() + this.startDelay));
    trigger.setRepeatCount(repeatCount);
    trigger.setRepeatInterval(repeatInterval);
    return trigger;
}
 
开发者ID:Alfresco,项目名称:alfresco-core,代码行数:16,代码来源:TriggerBean.java

示例14: buildArticleContentHtml

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
public void buildArticleContentHtml(String id) {
	try {
		String jobName = BuildArticleContentHtmlJob.JOB_NAME + id;
		String triggerName = BuildArticleContentHtmlJob.TRIGGER_NAME + id;
		String groupName = BuildArticleContentHtmlJob.GROUP_NAME;
		
		SimpleTrigger simpleTrigger = new SimpleTrigger();
		simpleTrigger.setName(triggerName);
		simpleTrigger.setGroup(groupName);
		simpleTrigger.setJobName(jobName);
		simpleTrigger.setJobGroup(groupName);
		simpleTrigger.setStartTime(DateUtils.addSeconds(new Date(), SettingUtil.getSetting().getBuildHtmlDelayTime()));
		simpleTrigger.setRepeatCount(0);
		simpleTrigger.setRepeatInterval(60);
		
		JobDetail jobDetail = scheduler.getJobDetail(jobName, groupName);
		if (jobDetail != null) {
			scheduler.rescheduleJob(triggerName, groupName, simpleTrigger);
			jobDetail.getJobDataMap().put("id", id);
		} else {
			jobDetail = new JobDetail(jobName, groupName, BuildArticleContentHtmlJob.class);
			jobDetail.getJobDataMap().put("id", id);
			scheduler.scheduleJob(jobDetail, simpleTrigger);
		}
		
		if (scheduler.isShutdown()) {
			scheduler.start();
		}
	} catch (SchedulerException e) {
		e.printStackTrace();
	}
}
 
开发者ID:wangko27,项目名称:SelfSoftShop,代码行数:33,代码来源:JobServiceImpl.java

示例15: buildGoodsContentHtml

import org.quartz.SimpleTrigger; //导入方法依赖的package包/类
public void buildGoodsContentHtml(String id) {
	try {
		String jobName = BuildGoodsContentHtmlJob.JOB_NAME + id;
		String triggerName = BuildGoodsContentHtmlJob.TRIGGER_NAME + id;
		String groupName = BuildGoodsContentHtmlJob.GROUP_NAME;
		
		SimpleTrigger simpleTrigger = new SimpleTrigger();
		simpleTrigger.setName(triggerName);
		simpleTrigger.setGroup(groupName);
		simpleTrigger.setJobName(jobName);
		simpleTrigger.setJobGroup(groupName);
		simpleTrigger.setStartTime(DateUtils.addSeconds(new Date(), SettingUtil.getSetting().getBuildHtmlDelayTime()));
		simpleTrigger.setRepeatCount(0);
		simpleTrigger.setRepeatInterval(60);
		
		JobDetail jobDetail = scheduler.getJobDetail(jobName, groupName);
		if (jobDetail != null) {
			scheduler.rescheduleJob(triggerName, groupName, simpleTrigger);
			jobDetail.getJobDataMap().put("id", id);
		} else {
			jobDetail = new JobDetail(jobName, groupName, BuildGoodsContentHtmlJob.class);
			jobDetail.getJobDataMap().put("id", id);
			scheduler.scheduleJob(jobDetail, simpleTrigger);
		}
		
		if (scheduler.isShutdown()) {
			scheduler.start();
		}
	} catch (SchedulerException e) {
		e.printStackTrace();
	}
}
 
开发者ID:wangko27,项目名称:SelfSoftShop,代码行数:33,代码来源:JobServiceImpl.java


注:本文中的org.quartz.SimpleTrigger.setStartTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。