| package com.doumee.job; | 
|   | 
| import com.doumee.core.job.BaseJob; | 
| import com.doumee.core.job.JobContext; | 
| import com.doumee.core.job.JobParam; | 
| import lombok.extern.slf4j.Slf4j; | 
| import org.springframework.stereotype.Component; | 
|   | 
| /** | 
|  * 普通的定时任务 | 
|  * @author  dm | 
|  * @since 2025/03/31 16:44 | 
|  */ | 
| @Slf4j | 
| @Component("commonTestJob") | 
| public class CommonTestJob extends BaseJob { | 
|   | 
|     @Override | 
|     public JobContext execute(JobParam param) { | 
|         JobContext jobContext = new JobContext(); | 
|         try { | 
|             jobContext.setContext("暂停20000毫秒"); | 
|             Thread.sleep(20000); | 
|         } catch (InterruptedException e) { | 
|             e.printStackTrace(); | 
|         } | 
|         return jobContext; | 
|     } | 
| } |