yun-0001 opened a new issue, #2246:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2246
/***
* 动态创建定时任务
* @param jobName:定时任务名称
* @param cron:表达式
* @param shardingTotalCount:分片数量
* @param instance:定时任务实例
* @param parameters:参数
*/
public void create(String jobName, String cron, int shardingTotalCount,
SimpleJob instance, String parameters){
JobConfiguration jobConfig = JobConfiguration.newBuilder(jobName,
shardingTotalCount)
.cron(cron)
.failover(true)
.overwrite(true)
.jobParameter(parameters)
.monitorExecution(true)
.misfire(true).build();
//启动分布式定时任务
new ScheduleJobBootstrap(registryCenter, new DynamicJob(),
jobConfig).schedule();
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]