Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0042a9e

Browse files
committedNov 12, 2024·
[IDLE-000] 1주치 공고 일괄 크롤링 로직 수행
1 parent 275a32a commit 0042a9e

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed
 

‎idle-batch/src/main/kotlin/com/swm/idle/batch/common/scheduler/CrawlingJobScheduler.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CrawlingJobScheduler(
1313
private val crawlingJobConfig: CrawlingJobConfig,
1414
) {
1515

16-
@Scheduled(cron = "0 20 16 * * *")
16+
@Scheduled(cron = "0 00 23 * * *")
1717
fun scheduleJob() {
1818
val jobParameters: JobParameters = JobParametersBuilder()
1919
.addLong("timestamp", System.currentTimeMillis())

‎idle-batch/src/main/kotlin/com/swm/idle/batch/job/CrawlingJobPostingTasklet.kt

+1-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,7 @@ class CrawlingJobPostingTasklet(
2121
private val logger = KotlinLogging.logger { }
2222

2323
override fun execute(contribution: StepContribution, chunkContext: ChunkContext): RepeatStatus {
24-
val crawlingJobPostings: List<CrawledJobPostingDto>? = try {
25-
WorknetCrawler.run()
26-
} catch (e: Exception) {
27-
logger.warn {
28-
e.toString()
29-
}
30-
e.printStackTrace() // 오류 로그 출력
31-
null // 오류 발생
32-
}
24+
val crawlingJobPostings: List<CrawledJobPostingDto>? = WorknetCrawler.run()
3325

3426
if (crawlingJobPostings != null) {
3527
crawlingJobPostings.mapNotNull { crawledJobPosting ->

0 commit comments

Comments
 (0)
Please sign in to comment.