<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package com.bcxin.backend.scheduling;

import com.bcxin.backend.service.BgScreeningService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * description: 鑳岀瓫瀹氭椂浠诲姟
 * author: linchunpeng
 * date:  2023-07-12 18:07
 */
@Slf4j
@Component
public class BgScreeningTask {

    @Autowired
    private BgScreeningService bgScreeningService;

    /**
     * description: 鏂板叆鑱屽憳宸ヨ儗绛涘畾鏃朵换鍔�
     * author: linchunpeng
     * date:  2023-07-12 18:09
     */
    @Scheduled(cron = "${myapps.screening.scheduled.induction}")
    public void induction() {
        log.info("===================================鏂板叆鑱屽憳宸ヨ儗绛涘畾鏃朵换鍔�===================================");
        bgScreeningService.runNewRecruit();
        log.info("===================================鏂板叆鑱屽憳宸ヨ儗绛涗换鍔＄粨鏉�===================================");
    }

    /**
     * description: 瀹氭湡鑳岀瓫瀹氭椂浠诲姟
     * author: linchunpeng
     * date:  2023-07-12 18:09
     */
    @Scheduled(cron = "${myapps.screening.scheduled.timing}")
    public void timing() {
        log.info("===================================瀹氭湡鑳岀瓫瀹氭椂浠诲姟===================================");
        bgScreeningService.runIntervals();
        log.info("===================================瀹氭湡鑳岀瓫瀹氭椂浠诲姟缁撴潫===================================");
    }

}
</pre></body></html>