From 9e6d1d028d1190bca2feb699576cd6400804d779 Mon Sep 17 00:00:00 2001 From: Casey Timm Date: Sun, 20 Jul 2025 18:49:20 -0400 Subject: [PATCH] Add auto pull --- src/hooks.server.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/hooks.server.js b/src/hooks.server.js index 3b1e83e..9d58240 100644 --- a/src/hooks.server.js +++ b/src/hooks.server.js @@ -1,18 +1,12 @@ import { CronJob } from 'cron'; +import { pullData } from './lib/united.js'; -/* const job = new CronJob( - '10 0 * * * *', // cronTime + '0,30 * * * *', // cronTime async function () { - const startDate = Math.floor( - new Date(new Date().getFullYear(), new Date().getMonth()).getTime() / 1000 - ); - const res = await fetchAccounts(startDate); - await updateAccounts(res); - await runRules(); + pullData(20); }, // onTick null, // onComplete true, // start 'America/Detroit' // timeZone ); -*/