Home / Function/ getScheduleMessage() — supabase Function Reference

getScheduleMessage() — supabase Function Reference

Architecture documentation for the getScheduleMessage() function in CronJobs.utils.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  db635c30_5fb4_0763_08b7_100d0df1469e["getScheduleMessage()"]
  449db5e2_4110_a6b4_0fbd_4a79211a5b8f["CronJobScheduleSection()"]
  449db5e2_4110_a6b4_0fbd_4a79211a5b8f -->|calls| db635c30_5fb4_0763_08b7_100d0df1469e
  style db635c30_5fb4_0763_08b7_100d0df1469e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/Integrations/CronJobs/CronJobs.utils.tsx lines 191–211

export function getScheduleMessage(scheduleString: string) {
  if (!scheduleString) {
    return 'Enter a valid cron expression above'
  }

  // if the schedule is in seconds format, scheduleString is same as the schedule
  if (secondsPattern.test(scheduleString)) {
    return `The cron will run every ${scheduleString}`
  }

  if (scheduleString.includes('Invalid cron expression')) {
    return scheduleString
  }

  const readableSchedule = scheduleString
    .split(' ')
    .map((s, i) => (i === 0 ? s.toLowerCase() : s))
    .join(' ')

  return `The cron will run ${readableSchedule}.`
}

Subdomains

Frequently Asked Questions

What does getScheduleMessage() do?
getScheduleMessage() is a function in the supabase codebase.
What calls getScheduleMessage()?
getScheduleMessage() is called by 1 function(s): CronJobScheduleSection.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free