java 定时

1.主类下加标签 @EnableScheduling

2.controller建立平级
image

@Slf4j
@RequiredArgsConstructor
@Component
public class MeetingMarkJob {

	final CppccMailService cppccMailService;
	//final RemoteMeetingService remoteMeetingService;
	final CustomSqlService customSqlService;


	/**
	 * 10分钟刷新一次
	 * 1s(秒) = 1000
	 */
	@Scheduled(cron="0 */10 * * * ?")
//	@Scheduled(cron="0 */1 * * * ?")
//	@Scheduled(initialDelay = 20000, fixedDelay = 600000)
	public void timerMeeting(){
	
	}
posted @ 2023-03-28 10:55  寒冷的雨呢  阅读(23)  评论(0编辑  收藏  举报