Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
refactor: put exchange rates job on chron schedule
Brad Barbin01bae7490534
diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.ymlindex 120f05f767..a7a57f4a9d 100644--- a/.github/workflows/trigger.yml+++ b/.github/workflows/trigger.yml@@ -6,6 +6,7 @@ on:- mainpaths:- "apps/carbon/app/trigger/**"+ workflow_dispatch:jobs:deploy:diff --git a/apps/carbon/app/trigger/update-exchange-rates.ts b/apps/carbon/app/trigger/update-exchange-rates.tsindex 67c609ccf8..3a384c0ce2 100644--- a/apps/carbon/app/trigger/update-exchange-rates.ts+++ b/apps/carbon/app/trigger/update-exchange-rates.ts@@ -1,5 +1,5 @@import { getCarbonServiceRole } from "@carbon/auth";-import { task, wait } from "@trigger.dev/sdk/v3";+import { schedules, wait } from "@trigger.dev/sdk/v3";import type { ExchangeRatesClient, Rates } from "~/lib/exchange-rates.server";import { getExchangeRatesClient } from "~/lib/exchange-rates.server";import type { CurrencyCode } from "~/modules/accounting";@@ -7,8 +7,9 @@ import { exchangeRatesFormValidator } from "~/modules/settings";const serviceRole = getCarbonServiceRole();-export const updateExchangeRates = task({+export const updateExchangeRates = schedules.task({id: "update-exchange-rates",+ cron: "0 */8 * * *",run: async () => {let rates: Rates;let hasRates = false;