diff --git a/src/hooks.server.js b/src/hooks.server.js index c8a4797..1f3f2d2 100644 --- a/src/hooks.server.js +++ b/src/hooks.server.js @@ -1,18 +1,17 @@ import { CronJob } from 'cron'; import { fetchAccounts } from '$lib/simplefin'; -import type { Handle } from "@sveltejs/kit"; - const job = new CronJob( '10 0 * * * *', // cronTime async function () { - const statDate = Math.floor(new Date(new Date().getFullYear(), new Date().getMonth()).getTime() / 1000); + const statDate = Math.floor( + new Date(new Date().getFullYear(), new Date().getMonth()).getTime() / 1000 + ); const res = await fetchAccounts(startDate); - await updateAccounts(res); - await runRules(); + await updateAccounts(res); + await runRules(); }, // onTick null, // onComplete true, // start 'America/Detroit' // timeZone ); -