christ258 opened a new issue #1373: URL: https://github.com/apache/shardingsphere-elasticjob/issues/1373
## Bug Report **For English only**, other languages will not accept. Before report a bug, make sure you have: - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere-elastic-job-lite/issues). - Read documentation: [ElasticJob Doc](http://shardingsphere.apache.org/elasticjob/docs/elastic-job-lite/00-overview/). Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will **close it**. Please answer these questions before submitting your issue. Thanks! ### Which version of ElasticJob did you use? ### Which project did you use? ElasticJob-Lite or ElasticJob-Cloud? ### Expected behavior ### Actual behavior ### Reason analyze (If you can) ### Steps to reproduce the behavior. ### Example codes for reproduce this issue (such as a github link). 当动态创建任务后,本服务重启后不继续执行,在多个不同ip的服务时,也无法获取并注册到此服务,无法继续执行。 动态创建使用如下方式: ` public void addSimpleJob(final String jobName , final SimpleJob simpleJob, final String cron, final int shardingTotalCount, final String shardingItemParameters){ simpleJobScheduler(jobName,simpleJob,cron,shardingTotalCount,shardingItemParameters).init(); } private JobScheduler simpleJobScheduler(final String jobName , final SimpleJob simpleJob, final String cron, final int shardingTotalCount, final String shardingItemParameters) { LiteJobConfiguration liteJobConfiguration = getLiteJobConfiguration(jobName ,simpleJob.getClass(), cron, shardingTotalCount, shardingItemParameters); return new SpringJobScheduler(simpleJob, regCenter,liteJobConfiguration,elasticJobListener); } private LiteJobConfiguration getLiteJobConfiguration(final String jobName ,final Class<? extends SimpleJob> jobClass, final String cron, final int shardingTotalCount, final String shardingItemParameters) { JobCoreConfiguration jobCoreConfiguration = JobCoreConfiguration.newBuilder( jobName, cron, shardingTotalCount).shardingItemParameters(shardingItemParameters).build(); JobTypeConfiguration jobTypeConfiguration = new SimpleJobConfiguration(jobCoreConfiguration, jobClass.getCanonicalName()); return LiteJobConfiguration.newBuilder(jobTypeConfiguration).overwrite(true).build(); } ` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
