{"record":{"id":"1042c05643309b6e","repo":"cube-js/cube","slug":"value-raw-is-not-valid-for-cubejs-scheduled-r","errorCode":null,"errorMessage":"Value \"${raw}\" is not valid for CUBEJS_SCHEDULED_REFRESH_TIMEZONES. Must be a comma-separated list of valid IANA time zone names, e.g. UTC,America/Los_Angeles.","messagePattern":"Value \"(.+?)\" is not valid for CUBEJS_SCHEDULED_REFRESH_TIMEZONES\\. Must be a comma-separated list of valid IANA time zone names, e\\.g\\. UTC,America/Los_Angeles\\.","errorType":"validation","errorClass":"InvalidConfiguration","httpStatus":null,"severity":"error","filePath":"packages/cubejs-backend-shared/src/env.ts","lineNumber":283,"sourceCode":"    }\n\n    // It's true by default for development\n    return process.env.NODE_ENV !== 'production';\n  },\n  scheduledRefreshQueriesPerAppId: () => get('CUBEJS_SCHEDULED_REFRESH_QUERIES_PER_APP_ID').asIntPositive(),\n  refreshWorkerConcurrency: () => get('CUBEJS_REFRESH_WORKER_CONCURRENCY')\n    .asIntPositive(),\n  scheduledRefreshTimezones: () => {\n    const timezones = get('CUBEJS_SCHEDULED_REFRESH_TIMEZONES')\n      .default('')\n      .asArray()\n      .map(timezone => timezone.trim())\n      .filter(Boolean);\n\n    return timezones.map(raw => {\n      const timezone = canonicalTimezone(raw);\n      if (!timezone) {\n        throw new InvalidConfiguration(\n          'CUBEJS_SCHEDULED_REFRESH_TIMEZONES',\n          raw,\n          'Must be a comma-separated list of valid IANA time zone names, e.g. UTC,America/Los_Angeles.'\n        );\n      }\n\n      return timezone;\n    });\n  },\n  preAggregationsBuilder: () => get('CUBEJS_PRE_AGGREGATIONS_BUILDER').asBool(),\n  gracefulShutdown: () => get('CUBEJS_GRACEFUL_SHUTDOWN')\n    .asIntPositive(),\n  dockerImageVersion: () => get('CUBEJS_DOCKER_IMAGE_VERSION')\n    .asString(),\n  concurrency: ({\n    dataSource,\n  }: {\n    dataSource: string,","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-backend-shared/src/env.ts#L265-L301","documentation":"CUBEJS_SCHEDULED_REFRESH_TIMEZONES must be a comma-separated list of IANA time zone names; each entry is passed through canonicalTimezone and entries that cannot be canonicalized make Cube throw InvalidConfiguration. This ensures pre-aggregation refresh scheduling uses recognizable zones.","triggerScenarios":"Setting CUBEJS_SCHEDULED_REFRESH_TIMEZONES with an entry that is not a valid IANA name, e.g. 'UTC,PST' or 'America/New York' (space, unquoted) or 'america/los_angeles' if canonicalization is case-sensitive, or an empty entry like 'UTC,,Europe/Berlin' (empties are filtered, but misspelled names throw).","commonSituations":"Using abbreviations (PST, EST, CET) instead of IANA names; typos like 'Amercia/New_York'; copy-pasting a list with stray whitespace or trailing commas; Windows-style zone names.","solutions":["Replace abbreviations with IANA names, e.g. America/Los_Angeles instead of PST.","Validate each entry against the IANA database (Intl.supportedValuesOf('timeZone') in Node 18+).","Remove empty/extra commas and ensure entries are separated by single commas.","Test with Node: new Intl.DateTimeFormat('en-US',{timeZone:'Your/Zone'}) — if it throws, fix the name."],"exampleFix":"// before\nCUBEJS_SCHEDULED_REFRESH_TIMEZONES=UTC,PST,America/New_York\n// after\nCUBEJS_SCHEDULED_REFRESH_TIMEZONES=UTC,America/Los_Angeles,America/New_York","handlingStrategy":"validation","validationCode":"const zones = (process.env.CUBEJS_SCHEDULED_REFRESH_TIMEZONES || '').split(',').map(s => s.trim()).filter(Boolean);\nconst valid = new Set(Intl.supportedValuesOf ? Intl.supportedValuesOf('timeZone') : ['UTC']);\nconst bad = zones.filter(z => !valid.has(z));\nif (bad.length) throw new Error(`Invalid IANA time zones: ${bad.join(', ')}`);","typeGuard":null,"tryCatchPattern":"try {\n  configureScheduledRefresh();\n} catch (e) {\n  if (String(e.message).includes('CUBEJS_SCHEDULED_REFRESH_TIMEZONES')) {\n    console.error('Use comma-separated IANA names, e.g. UTC,America/Los_Angeles');\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Use full IANA names (America/Los_Angeles), never abbreviations (PST).","Validate zone lists with Intl.supportedValuesOf('timeZone') in CI.","Avoid double commas and trailing commas."],"tags":["configuration","timezone","validation"],"backgroundTag":"invalid-timezone-name","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}