Skip to content

Commit

Permalink
add a dummy scheduled action
Browse files Browse the repository at this point in the history
  • Loading branch information
elmarx committed Oct 3, 2024
1 parent 86d06af commit 546587a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/kotlin/org/athmer/k8s/scheduler/Job.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.athmer.k8s.scheduler

import org.slf4j.LoggerFactory
import org.springframework.scheduling.annotation.Scheduled
import org.springframework.stereotype.Component

@Component
class Job {

val logger = LoggerFactory.getLogger(this::class.java)

@Scheduled(fixedRate = 1000)
fun log() {
logger.info("Job started")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package org.athmer.k8s.scheduler

import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.scheduling.annotation.EnableScheduling

@SpringBootApplication
@EnableScheduling
class SchedulerApplication

fun main(args: Array<String>) {
Expand Down

0 comments on commit 546587a

Please sign in to comment.