package com.moka.gdtauto.task;

import lombok.extern.slf4j.Slf4j;
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 示例定时任务
 */
@Slf4j
@Component
public class ExampleTask {

    /**
     * 每5分钟执行一次
     */
    @Scheduled(cron = "0 */5 * * * ?")
    @SchedulerLock(name = "exampleTask", lockAtMostFor = "4m", lockAtLeastFor = "1m")
    public void execute() {
        log.info("示例定时任务执行");
        // TODO: 实现定时任务逻辑
    }
}
