Files
Calbook/scripts/run-sync.ts

29 lines
559 B
TypeScript

import { syncAllEnabledCalendars } from "../lib/services/caldav";
import { runAppointmentReminders } from "../lib/services/reminders";
async function main() {
const [syncResult, reminderResult] = await Promise.all([
syncAllEnabledCalendars(),
runAppointmentReminders()
]);
console.log(
JSON.stringify(
{
sync: syncResult,
reminders: reminderResult
},
null,
2
)
);
}
main()
.catch((error) => {
console.error(error);
process.exit(1);
})
.finally(() => {
process.exit(0);
});