From a93b554f8b9a004dc8f28a1a479ff6d9537b3290 Mon Sep 17 00:00:00 2001 From: Son Yen Nguyen Date: Wed, 17 Jan 2024 00:22:35 +0700 Subject: [PATCH] Feat: Update cron parser human readable string (#847) * Update cron parser human readable string * Create hot-cobras-flow.md --------- Co-authored-by: Matt Aitken --- .changeset/hot-cobras-flow.md | 5 +++++ apps/webapp/app/components/jobs/JobsTable.tsx | 10 +++++----- packages/trigger-sdk/src/triggers/scheduled.ts | 6 +++++- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .changeset/hot-cobras-flow.md diff --git a/.changeset/hot-cobras-flow.md b/.changeset/hot-cobras-flow.md new file mode 100644 index 0000000000..0da799c89a --- /dev/null +++ b/.changeset/hot-cobras-flow.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/sdk": patch +--- + +Make it clear that schedules are UTC by appending "UTC" to the end. diff --git a/apps/webapp/app/components/jobs/JobsTable.tsx b/apps/webapp/app/components/jobs/JobsTable.tsx index f785fba03a..0b52ef6f13 100644 --- a/apps/webapp/app/components/jobs/JobsTable.tsx +++ b/apps/webapp/app/components/jobs/JobsTable.tsx @@ -49,13 +49,13 @@ export function JobsTable({ jobs, noResultsText }: { jobs: ProjectJob[]; noResul - + - {" "} + {" "} Dynamic: {job.event.title} ) : ( @@ -75,9 +75,9 @@ export function JobsTable({ jobs, noResultsText }: { jobs: ProjectJob[]; noResul key={integration.key} button={
- + {integration.setupStatus === "MISSING_FIELDS" && ( - + )}
} @@ -99,7 +99,7 @@ export function JobsTable({ jobs, noResultsText }: { jobs: ProjectJob[]; noResul {job.properties && ( +
{job.properties.map((property, index) => ( { constructor(private options: CronOptions) {} get event() { + /** + * We need to concat `(UTC)` string at the end of the human readable string to avoid confusion + * with execution time/last run of a job in the UI dashboard which is displayed in local time. + */ const humanReadable = cronstrue.toString(this.options.cron, { throwExceptionOnParseError: false, - }); + }).concat(" (UTC)"); return { name: "trigger.scheduled",