@SpringBootApplication
@EnableScheduling
public class QuantApplication {
public static void main(String[] args) {
SpringApplication.run(QuantApplication.class, args);
}
}
// 1. QuantDataController.java, CompanyDetailController.java
@Scheduled(cron = "0 30 0 * 2,5,7,11 *", zone = "Asia/Seoul")
public ResponseEntity<String> bulkUpdate()
throws JsonParseException, JsonMappingException, IOException {
//해당 Logic...
}
// 2. DailyPriceController.java
@Scheduled(cron = "0 30 16 * * 1-5", zone = "Asia/Seoul")
public ResponseEntity<String> bulkUpdate()
throws JsonParseException, JsonMappingException, IOException {
//해당 Logic...
}