package com.style24.batch.biz.task;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * HealthCheck Task
 * @author gagamel
 * @since 2020. 11. 16
 */
@Component
@Slf4j
public class TsbHealthCheckTask {

	/**
	 * fixedDelay = 30000: 이전 수행이 종료되고, 30초 이후 해당 job을 수행함
	 */
	//@Scheduled(fixedDelay = 30000)
	@Async
	public void printCurrentTime() throws Exception {
		log.info("STYLE24 Batch is running. (now : {})", (new SimpleDateFormat("yyyy/MM/dd HH:mm:ss")).format(new Date()));
	}

}
