how to stop spring batch scheduled jobs from running at first time when executing the code?

前端 未结 4 1502
有刺的猬
有刺的猬 2020-12-28 15:53

i\'m using spring batch 2.2.4 with quartz to run some jobs at certain time

the problem is the jobs always run after executing the code at the first time then it runs

4条回答
  •  遥遥无期
    2020-12-28 16:30

    I guess some configuration problem. Here is the configurations I tested with same cron expression. I've launch-context.xml with following configuration.

    
        
            
    
                
                    
                        classpath*:configurations/kp-batch.xml
                    
                
    
            
        
    
        
            
                
            
        
    
    
    
    
    
        
            
                
            
        
    
    
    
        
        
    
    
    
        
        
            
                
                
                
            
        
    
    
    
        
    
    
    
        
    
    
    
        
    
    

    In the kp-batch.xml, I've defined job, itemreader, itemwriter etc.

提交回复
热议问题