package com.YuyeTech.HeartRate.game.food.scheduled;

import org.quartz.CronScheduleBuilder;
import org.quartz.Trigger;
import org.quartz.TriggerBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FoodQuartzConfig {

    private static String DayTrigger = "0/5 * * * * ?";

    @Bean
    public Trigger syncFoodDayTrigger(){
        //每隔五秒触发一次，暂时
        CronScheduleBuilder cronScheduleBuilder = CronScheduleBuilder.cronSchedule(DayTrigger);

        Trigger trigger = TriggerBuilder.newTrigger().forJob("").withSchedule(cronScheduleBuilder).build();
        return trigger;
    }
}
