Files
luminic-space-back-v2/src/main/kotlin/space/luminic/finance/services/Scheduler.kt
2025-11-17 15:02:47 +03:00

20 lines
632 B
Kotlin

package space.luminic.finance.services
import org.slf4j.LoggerFactory
import org.springframework.scheduling.annotation.EnableScheduling
import org.springframework.scheduling.annotation.Scheduled
import org.springframework.stereotype.Service
@EnableScheduling
@Service
class Scheduler(
private val recurrentOperationService: RecurrentOperationService
) {
private val log = LoggerFactory.getLogger(Scheduler::class.java)
@Scheduled(cron = "0 0 3 * * *")
fun createRecurrentAfter13Month() {
log.info("Creating recurrent after 13 month")
recurrentOperationService.createRecurrentTransactions()
}
}