package com.eactive.eai.rms.onl.common.scheduler;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ScheduleMethod {
	String value() default "";

	ScheduleType type();

	/**
	 * @return millisecond
	 */
	long startDelay() default 0;

	/**
	 * @return millisecond
	 */
	long repeatInterval() default 0;

	boolean concurrent() default false;

	/**
	 * Cron expression. <br />
	 * Seconds    		0-59    				, - * / <br />
	 * Minutes    		0-59    				, - * / <br />
	 * Hours    		0-23    				, - * / <br />
	 * Day-of-month    	1-31    				, - * ? / L W <br />
	 * Month    		1-12 or JAN-DEC    		, - * / <br />
	 * Day-of-Week    	1-7 or SUN-SAT    		, - * ? / L # <br />
	 * Year (Optional)  empty, 1970-2099   	 	, - * / <br />
	 * 
	 * '*' 는 all '?' 는 설정 하지 않음. <br />
	 * 
	 * 1 * * * * ? : 매분 1초	<br />
	 * 
	 * 0 0 10 * * ? : 매일 10 시	<br />
	 * 
	 * @return the string
	 */
	String cronExpression() default "";
}
