Fengxu1234 commented on issue #1261:
URL: 
https://github.com/apache/shardingsphere-elasticjob/issues/1261#issuecomment-663370364


    @RequestMapping(value = "/addJob", method = RequestMethod.POST)
       public void addJob(@RequestBody String data, HttpServletRequest request, 
HttpServletResponse response) {
   
           JSONObject dataS = JSONObject.parseObject(data);
           String id = dataS.getString("id");
           String cron = dataS.getString("corn");
           JobCoreConfiguration coreConfig = 
JobCoreConfiguration.newBuilder("JobA" + id, cron, 1).jobParameter(Id).build();
           SimpleJobConfiguration simpleJobConfig = new 
SimpleJobConfiguration(coreConfig, JobA.class.getCanonicalName());
           JobScheduler jobScheduler = new 
JobScheduler(zookeeperRegistryCenter, 
LiteJobConfiguration.newBuilder(simpleJobConfig).build(),jobEventConfiguration);
         
               jobScheduler.init();
    
       }
   
   Passing parameter id to the JobA, ervery  id create a Job as "JobA"+id . 
This scenario , how to implement to be distributed ?


----------------------------------------------------------------
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]


Reply via email to