- CronJob
- interface and simple impl for Actual
- interface and simple impl for Sparebank1
- Mappings between sparebank1 transactions and actual transactions
- Requires type keyword on type imports
This commit is contained in:
2024-11-17 22:27:29 +01:00
parent 90bcf94f14
commit 01af64349e
6 changed files with 167 additions and 34 deletions

View File

@ -0,0 +1,15 @@
import { CronJob } from "cron"
/**
* Run a function every day at 1 AM, Oslo time.
* @param onTick Function to run.
* @returns CronJob instance.
*/
export function cronJobDaily(onTick: () => Promise<void>): CronJob {
return CronJob.from({
cronTime: "0 0 1 * * *",
onTick,
start: true,
timeZone: "Europe/Oslo",
})
}