diff --git a/src/main.ts b/src/main.ts
index 4b83c7b..e1848f2 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -28,7 +28,6 @@ async function main(): Promise<void> {
   await runCronJob(bank)
 }
 
-// TODO log the days the transactions are fetched
 export async function moveTransactions(
   actual: Actual,
   bank: Bank,
@@ -81,31 +80,32 @@ async function runOnce(bank: Bank) {
 }
 
 async function runCronJob(bank: Bank): Promise<void> {
-  let actual: Actual | undefined
-  let cronJob: CronJob | undefined
-
   logger.info("Waiting for CronJob to start")
-  try {
-    // TODO move try-catch inside closure?
-    cronJob = cronJobDaily(async () => {
+
+  const cronJob = cronJobDaily(async () => {
+    let actual: Actual | undefined
+    try {
       actual = await ActualImpl.init()
       await moveTransactions(actual, bank)
-    })
-    registerInterrupt(bank, cronJob)
-  } catch (exception) {
-    logger.error(exception, "Caught exception at CronJob, shutting down!")
-    await shutdown(bank, cronJob)
-  } finally {
-    // TODO shuts down immediatly, move into closure
-    await actual?.shutdown()
-  }
+    } catch (exception) {
+      logger.error(exception, "Caught exception at CronJob, shutting down!")
+      await shutdown(bank, cronJob)
+    } finally {
+      await actual?.shutdown()
+    }
+  })
+  registerInterrupt(bank, cronJob)
 }
 
+let isShuttingDown = false
+
 function registerInterrupt(
   bank: Bank,
   cronJob: CronJob | undefined = undefined,
 ): void {
   process.on("SIGINT", async () => {
+    if (isShuttingDown) return
+    isShuttingDown = true
     logger.info("Caught interrupt signal")
     await shutdown(bank, cronJob)
   })