{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cron-job-scheduler",
  "title": "Cron Job Scheduler",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/cron-job-scheduler/CronJobScheduler.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  Activity,\n  AlertCircle,\n  AlertTriangle,\n  CalendarClock,\n  Check,\n  CheckCircle2,\n  Clock,\n  Copy,\n  Cpu,\n  Globe,\n  MoreHorizontal,\n  Pause,\n  Pencil,\n  Play,\n  Plus,\n  RefreshCw,\n  Search,\n  Terminal,\n  Trash2,\n  X,\n  XCircle,\n  Zap,\n} from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuLabel,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu'\nimport { Input } from '@/components/ui/input'\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'\n\nexport type JobStatus = 'active' | 'paused' | 'error'\n\nexport interface LastExecution {\n  status: 'success' | 'error'\n  code: string\n  duration: string\n  timestamp: string\n}\n\nexport interface CronJob {\n  id: string\n  name: string\n  target: string\n  cronExpression: string\n  humanSchedule: string\n  timezone: string\n  status: JobStatus\n  nextRun: string\n  lastExecution: LastExecution\n}\n\nexport interface CronStats {\n  totalScheduled: number\n  activeWorkers: number\n  failed24h: number\n  executionsToday: string\n}\n\nexport interface CronJobSchedulerProps {\n  initialJobs?: CronJob[]\n  initialStats?: CronStats\n  className?: string\n}\n\nconst defaultJobs: CronJob[] = [\n  {\n    id: 'job-1',\n    name: 'daily-billing-reconciliation',\n    target: 'POST https://api.acme.corp/v1/billing/reconcile',\n    cronExpression: '0 0 * * *',\n    humanSchedule: 'Every day at midnight',\n    timezone: 'UTC',\n    status: 'active',\n    nextRun: 'in 4 hours',\n    lastExecution: {\n      status: 'success',\n      code: '200 OK',\n      duration: '1.2s',\n      timestamp: '20 hours ago',\n    },\n  },\n  {\n    id: 'job-2',\n    name: 'database-backup-s3',\n    target: 'cron/infra::snapshotPostgres',\n    cronExpression: '0 */6 * * *',\n    humanSchedule: 'Every 6 hours',\n    timezone: 'UTC',\n    status: 'active',\n    nextRun: 'in 1 hour 45 min',\n    lastExecution: {\n      status: 'success',\n      code: '200 OK',\n      duration: '45.3s',\n      timestamp: '4 hours ago',\n    },\n  },\n  {\n    id: 'job-3',\n    name: 'cleanup-expired-sessions',\n    target: 'POST https://auth.acme.corp/cron/prune-sessions',\n    cronExpression: '*/30 * * * *',\n    humanSchedule: 'Every 30 minutes',\n    timezone: 'UTC',\n    status: 'active',\n    nextRun: 'in 12 min',\n    lastExecution: {\n      status: 'success',\n      code: '200 OK',\n      duration: '380ms',\n      timestamp: '18 min ago',\n    },\n  },\n  {\n    id: 'job-4',\n    name: 'send-digest-emails',\n    target: 'notifications::dispatchWeeklyDigest',\n    cronExpression: '0 9 * * 1',\n    humanSchedule: 'Every Monday at 09:00',\n    timezone: 'UTC',\n    status: 'paused',\n    nextRun: 'Paused',\n    lastExecution: {\n      status: 'success',\n      code: '200 OK',\n      duration: '8.4s',\n      timestamp: '4 days ago',\n    },\n  },\n  {\n    id: 'job-5',\n    name: 'sync-crm-contacts',\n    target: 'POST https://integrations.acme.corp/hubspot/sync',\n    cronExpression: '15 * * * *',\n    humanSchedule: 'At minute 15 of every hour',\n    timezone: 'UTC',\n    status: 'error',\n    nextRun: 'in 28 min',\n    lastExecution: {\n      status: 'error',\n      code: '504 Gateway Timeout',\n      duration: '30.0s',\n      timestamp: '32 min ago',\n    },\n  },\n]\n\nconst defaultStats: CronStats = {\n  totalScheduled: 14,\n  activeWorkers: 12,\n  failed24h: 1,\n  executionsToday: '48.2k',\n}\n\ntype Frequency = 'minute' | 'hour' | 'day' | 'week' | 'month'\n\nconst weekDayNames: Record<string, string> = {\n  '0': 'Sunday',\n  '1': 'Monday',\n  '2': 'Tuesday',\n  '3': 'Wednesday',\n  '4': 'Thursday',\n  '5': 'Friday',\n  '6': 'Saturday',\n}\n\nexport function CronJobScheduler({\n  initialJobs = defaultJobs,\n  initialStats = defaultStats,\n  className,\n}: CronJobSchedulerProps) {\n  const [jobs, setJobs] = React.useState<CronJob[]>(initialJobs)\n  const [search, setSearch] = React.useState<string>('')\n  const [statusFilter, setStatusFilter] = React.useState<'all' | JobStatus>('all')\n  const [bannerMessage, setBannerMessage] = React.useState<{ type: 'success' | 'info'; text: string } | null>(null)\n  const [runningJobId, setRunningJobId] = React.useState<string | null>(null)\n\n  // Dialogs\n  const [isCreateOpen, setIsCreateOpen] = React.useState<boolean>(false)\n  const [newJobName, setNewJobName] = React.useState<string>('')\n  const [newJobTarget, setNewJobTarget] = React.useState<string>('')\n  const [newJobCron, setNewJobCron] = React.useState<string>('0 0 * * *')\n  const [newJobTimezone, setNewJobTimezone] = React.useState<string>('UTC')\n\n  const [isLogsOpen, setIsLogsOpen] = React.useState<boolean>(false)\n  const [selectedJobForLogs, setSelectedJobForLogs] = React.useState<CronJob | null>(null)\n\n  // Helper State\n  const [helperFrequency, setHelperFrequency] = React.useState<Frequency>('day')\n  const [helperMinuteInterval, setHelperMinuteInterval] = React.useState<string>('15')\n  const [helperHourlyMinute, setHelperHourlyMinute] = React.useState<string>('0')\n  const [helperDailyHour, setHelperDailyHour] = React.useState<string>('0')\n  const [helperDailyMinute, setHelperDailyMinute] = React.useState<string>('0')\n  const [helperWeekDay, setHelperWeekDay] = React.useState<string>('1')\n  const [helperWeekHour, setHelperWeekHour] = React.useState<string>('9')\n  const [helperWeekMinute, setHelperWeekMinute] = React.useState<string>('0')\n  const [helperMonthDay, setHelperMonthDay] = React.useState<string>('1')\n  const [helperMonthHour, setHelperMonthHour] = React.useState<string>('0')\n  const [helperMonthMinute, setHelperMonthMinute] = React.useState<string>('0')\n  const [copiedCron, setCopiedCron] = React.useState<boolean>(false)\n\n  const currentCronExpression = React.useMemo(() => {\n    switch (helperFrequency) {\n      case 'minute':\n        return helperMinuteInterval === '1' ? '* * * * *' : `*/${helperMinuteInterval} * * * *`\n      case 'hour':\n        return `${helperHourlyMinute} * * * *`\n      case 'day':\n        return `${helperDailyMinute} ${helperDailyHour} * * *`\n      case 'week':\n        return `${helperWeekMinute} ${helperWeekHour} * * ${helperWeekDay}`\n      case 'month':\n        return `${helperMonthMinute} ${helperMonthHour} ${helperMonthDay} * *`\n      default:\n        return '0 0 * * *'\n    }\n  }, [\n    helperFrequency,\n    helperMinuteInterval,\n    helperHourlyMinute,\n    helperDailyHour,\n    helperDailyMinute,\n    helperWeekDay,\n    helperWeekHour,\n    helperWeekMinute,\n    helperMonthDay,\n    helperMonthHour,\n    helperMonthMinute,\n  ])\n\n  const currentHumanTranslation = React.useMemo(() => {\n    switch (helperFrequency) {\n      case 'minute':\n        return helperMinuteInterval === '1' ? 'Runs every minute' : `Runs every ${helperMinuteInterval} minutes`\n      case 'hour':\n        return helperHourlyMinute === '0'\n          ? 'Runs at the start of every hour (minute 0)'\n          : `Runs at minute ${helperHourlyMinute.padStart(2, '0')} of every hour`\n      case 'day':\n        return `Runs every day at ${helperDailyHour.padStart(2, '0')}:${helperDailyMinute.padStart(2, '0')} UTC`\n      case 'week': {\n        const day = weekDayNames[helperWeekDay] || 'Monday'\n        return `Runs every ${day} at ${helperWeekHour.padStart(2, '0')}:${helperWeekMinute.padStart(2, '0')} UTC`\n      }\n      case 'month':\n        return `Runs on day ${helperMonthDay} of every month at ${helperMonthHour.padStart(2, '0')}:${helperMonthMinute.padStart(2, '0')} UTC`\n      default:\n        return 'Every day at midnight'\n    }\n  }, [\n    helperFrequency,\n    helperMinuteInterval,\n    helperHourlyMinute,\n    helperDailyHour,\n    helperDailyMinute,\n    helperWeekDay,\n    helperWeekHour,\n    helperWeekMinute,\n    helperMonthDay,\n    helperMonthHour,\n    helperMonthMinute,\n  ])\n\n  const nextExecutionsPreview = React.useMemo(() => {\n    if (helperFrequency === 'minute') {\n      const step = Number(helperMinuteInterval) || 1\n      return [\n        { time: `2026-10-24 14:${String(step).padStart(2, '0')}:00 UTC`, relative: `in ${step} minutes` },\n        { time: `2026-10-24 14:${String(step * 2).padStart(2, '0')}:00 UTC`, relative: `in ${step * 2} minutes` },\n        { time: `2026-10-24 14:${String(step * 3).padStart(2, '0')}:00 UTC`, relative: `in ${step * 3} minutes` },\n      ]\n    }\n    if (helperFrequency === 'hour') {\n      const min = helperHourlyMinute.padStart(2, '0')\n      return [\n        { time: `2026-10-24 15:${min}:00 UTC`, relative: 'in 42 minutes' },\n        { time: `2026-10-24 16:${min}:00 UTC`, relative: 'in 1 hour 42 min' },\n        { time: `2026-10-24 17:${min}:00 UTC`, relative: 'in 2 hours 42 min' },\n      ]\n    }\n    if (helperFrequency === 'day') {\n      const hr = helperDailyHour.padStart(2, '0')\n      const min = helperDailyMinute.padStart(2, '0')\n      return [\n        { time: `2026-10-25 ${hr}:${min}:00 UTC`, relative: 'tomorrow' },\n        { time: `2026-10-26 ${hr}:${min}:00 UTC`, relative: 'in 2 days' },\n        { time: `2026-10-27 ${hr}:${min}:00 UTC`, relative: 'in 3 days' },\n      ]\n    }\n    if (helperFrequency === 'week') {\n      const hr = helperWeekHour.padStart(2, '0')\n      const min = helperWeekMinute.padStart(2, '0')\n      return [\n        { time: `2026-10-26 ${hr}:${min}:00 UTC`, relative: 'next Monday' },\n        { time: `2026-11-02 ${hr}:${min}:00 UTC`, relative: 'in 9 days' },\n        { time: `2026-11-09 ${hr}:${min}:00 UTC`, relative: 'in 16 days' },\n      ]\n    }\n    const dom = helperMonthDay.padStart(2, '0')\n    const hr = helperMonthHour.padStart(2, '0')\n    const min = helperMonthMinute.padStart(2, '0')\n    return [\n      { time: `2026-11-${dom} ${hr}:${min}:00 UTC`, relative: 'in 8 days' },\n      { time: `2026-12-${dom} ${hr}:${min}:00 UTC`, relative: 'in 38 days' },\n      { time: `2027-01-${dom} ${hr}:${min}:00 UTC`, relative: 'in 69 days' },\n    ]\n  }, [\n    helperFrequency,\n    helperMinuteInterval,\n    helperHourlyMinute,\n    helperDailyHour,\n    helperDailyMinute,\n    helperWeekHour,\n    helperWeekMinute,\n    helperMonthDay,\n    helperMonthHour,\n    helperMonthMinute,\n  ])\n\n  const applyPreset = (cron: string) => {\n    if (cron === '*/15 * * * *') {\n      setHelperFrequency('minute')\n      setHelperMinuteInterval('15')\n    } else if (cron === '0 * * * *') {\n      setHelperFrequency('hour')\n      setHelperHourlyMinute('0')\n    } else if (cron === '0 0 * * *') {\n      setHelperFrequency('day')\n      setHelperDailyHour('0')\n      setHelperDailyMinute('0')\n    } else if (cron === '0 9 * * 1') {\n      setHelperFrequency('week')\n      setHelperWeekDay('1')\n      setHelperWeekHour('9')\n      setHelperWeekMinute('0')\n    } else if (cron === '0 0 1 * *') {\n      setHelperFrequency('month')\n      setHelperMonthDay('1')\n      setHelperMonthHour('0')\n      setHelperMonthMinute('0')\n    }\n  }\n\n  const copyExpression = async (text: string) => {\n    try {\n      await navigator.clipboard.writeText(text)\n      setCopiedCron(true)\n      setTimeout(() => setCopiedCron(false), 2000)\n    } catch {\n      setCopiedCron(true)\n      setTimeout(() => setCopiedCron(false), 2000)\n    }\n  }\n\n  const filteredJobs = React.useMemo(() => {\n    const q = search.trim().toLowerCase()\n    return jobs.filter((job) => {\n      const matchesStatus = statusFilter === 'all' || job.status === statusFilter\n      const matchesSearch = !q || job.name.toLowerCase().includes(q) || job.target.toLowerCase().includes(q)\n      return matchesStatus && matchesSearch\n    })\n  }, [jobs, search, statusFilter])\n\n  const triggerRun = (job: CronJob) => {\n    setRunningJobId(job.id)\n    setBannerMessage({\n      type: 'success',\n      text: `Job \"${job.name}\" queued and running now on cluster edge-worker-01.`,\n    })\n    setTimeout(() => {\n      setRunningJobId(null)\n      setJobs((prev) =>\n        prev.map((j) =>\n          j.id === job.id\n            ? {\n                ...j,\n                lastExecution: {\n                  status: 'success',\n                  code: '200 OK',\n                  duration: '0.8s',\n                  timestamp: 'Just now',\n                },\n              }\n            : j,\n        ),\n      )\n    }, 1200)\n  }\n\n  const togglePause = (job: CronJob) => {\n    const nextStatus: JobStatus = job.status === 'active' ? 'paused' : 'active'\n    setJobs((prev) =>\n      prev.map((j) =>\n        j.id === job.id\n          ? {\n              ...j,\n              status: nextStatus,\n              nextRun: nextStatus === 'paused' ? 'Paused' : 'in 15 min',\n            }\n          : j,\n      ),\n    )\n    setBannerMessage({\n      type: 'info',\n      text: `Job \"${job.name}\" has been ${nextStatus === 'paused' ? 'paused' : 'resumed'}.`,\n    })\n  }\n\n  const deleteJob = (id: string) => {\n    const target = jobs.find((j) => j.id === id)\n    setJobs((prev) => prev.filter((j) => j.id !== id))\n    setBannerMessage({\n      type: 'info',\n      text: `Job \"${target?.name || id}\" removed from scheduler queue.`,\n    })\n  }\n\n  const openLogs = (job: CronJob) => {\n    setSelectedJobForLogs(job)\n    setIsLogsOpen(true)\n  }\n\n  const handleCreateJob = () => {\n    if (!newJobName.trim()) return\n    const newJob: CronJob = {\n      id: `job-${Date.now()}`,\n      name: newJobName.trim().toLowerCase().replace(/\\s+/g, '-'),\n      target: newJobTarget.trim() || 'POST https://api.acme.corp/v1/worker/execute',\n      cronExpression: newJobCron.trim() || '0 0 * * *',\n      humanSchedule: 'Custom scheduled trigger',\n      timezone: newJobTimezone || 'UTC',\n      status: 'active',\n      nextRun: 'in 5 min',\n      lastExecution: {\n        status: 'success',\n        code: 'Pending initial run',\n        duration: '—',\n        timestamp: 'Never',\n      },\n    }\n    setJobs((prev) => [newJob, ...prev])\n    setIsCreateOpen(false)\n    setNewJobName('')\n    setNewJobTarget('')\n    setBannerMessage({\n      type: 'success',\n      text: `New cron job \"${newJob.name}\" successfully created and registered in cluster.`,\n    })\n  }\n\n  return (\n    <div data-slot=\"cron-job-scheduler\" className={cn('w-full space-y-6', className)}>\n      {/* Header */}\n      <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n        <div className=\"space-y-1\">\n          <div className=\"flex items-center gap-2\">\n            <CalendarClock className=\"text-primary size-6\" />\n            <h1 className=\"text-foreground text-2xl font-bold tracking-tight\">Cron Jobs & Scheduled Tasks</h1>\n          </div>\n          <p className=\"text-muted-foreground text-sm\">\n            Configure automated background workers, recurring tasks, and queue schedules.\n          </p>\n        </div>\n\n        <div className=\"flex items-center gap-2\">\n          <Button onClick={() => setIsCreateOpen(true)}>\n            <Plus className=\"mr-1.5 size-4\" />\n            New Cron Job\n          </Button>\n        </div>\n      </div>\n\n      {/* Notification / Action banner */}\n      {bannerMessage && (\n        <div className=\"border-border bg-card flex items-center justify-between gap-3 rounded-lg border p-3 shadow-xs\">\n          <div className=\"flex items-center gap-2.5 text-sm\">\n            {bannerMessage.type === 'success' ? (\n              <CheckCircle2 className=\"text-success size-4 shrink-0\" />\n            ) : (\n              <Zap className=\"text-primary size-4 shrink-0\" />\n            )}\n            <span className=\"text-foreground font-medium\">{bannerMessage.text}</span>\n          </div>\n          <Button variant=\"ghost\" size=\"icon\" className=\"size-7\" onClick={() => setBannerMessage(null)}>\n            <X className=\"size-3.5\" />\n            <span className=\"sr-only\">Dismiss</span>\n          </Button>\n        </div>\n      )}\n\n      {/* 4 Stat / KPI Cards */}\n      <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n        <Card className=\"shadow-xs\">\n          <CardHeader className=\"flex flex-row items-center justify-between pb-2\">\n            <CardTitle className=\"text-muted-foreground text-sm font-medium\">Total Scheduled</CardTitle>\n            <div className=\"bg-primary/10 text-primary rounded-lg p-2\">\n              <Clock className=\"size-4\" />\n            </div>\n          </CardHeader>\n          <CardContent className=\"space-y-1\">\n            <div className=\"text-foreground text-2xl font-bold tracking-tight\">{initialStats.totalScheduled}</div>\n            <p className=\"text-muted-foreground text-xs\">Across 4 worker clusters</p>\n          </CardContent>\n        </Card>\n\n        <Card className=\"shadow-xs\">\n          <CardHeader className=\"flex flex-row items-center justify-between pb-2\">\n            <CardTitle className=\"text-muted-foreground text-sm font-medium\">Active Workers</CardTitle>\n            <div className=\"bg-success/10 text-success rounded-lg p-2\">\n              <Cpu className=\"size-4\" />\n            </div>\n          </CardHeader>\n          <CardContent className=\"space-y-1\">\n            <div className=\"text-foreground text-2xl font-bold tracking-tight\">{initialStats.activeWorkers}</div>\n            <p className=\"text-muted-foreground text-xs\">2 currently paused</p>\n          </CardContent>\n        </Card>\n\n        <Card className=\"border-warning/30 bg-warning/5 bg-warning/10 shadow-xs\">\n          <CardHeader className=\"flex flex-row items-center justify-between pb-2\">\n            <CardTitle className=\"text-warning text-sm font-medium\">Failed in 24h</CardTitle>\n            <div className=\"bg-warning/20 text-warning rounded-lg p-2\">\n              <AlertTriangle className=\"size-4\" />\n            </div>\n          </CardHeader>\n          <CardContent className=\"space-y-1\">\n            <div className=\"flex items-center gap-2\">\n              <span className=\"text-warning text-2xl font-bold tracking-tight\">{initialStats.failed24h}</span>\n              <Badge variant=\"warning\" className=\"text-xs\">\n                Amber alert\n              </Badge>\n            </div>\n            <p className=\"text-warning/90 text-xs\">1 job needs attention</p>\n          </CardContent>\n        </Card>\n\n        <Card className=\"shadow-xs\">\n          <CardHeader className=\"flex flex-row items-center justify-between pb-2\">\n            <CardTitle className=\"text-muted-foreground text-sm font-medium\">Executions Today</CardTitle>\n            <div className=\"bg-info/10 text-info rounded-lg p-2\">\n              <Activity className=\"size-4\" />\n            </div>\n          </CardHeader>\n          <CardContent className=\"space-y-1\">\n            <div className=\"text-foreground text-2xl font-bold tracking-tight\">{initialStats.executionsToday}</div>\n            <p className=\"text-muted-foreground text-xs\">99.8% success rate (18ms avg)</p>\n          </CardContent>\n        </Card>\n      </div>\n\n      {/* Scheduled Jobs Table Card */}\n      <Card className=\"shadow-xs\">\n        <CardHeader className=\"pb-3\">\n          <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n            <div>\n              <CardTitle className=\"text-lg font-semibold\">Scheduled Jobs</CardTitle>\n              <CardDescription className=\"text-xs\">\n                {filteredJobs.length} of {jobs.length} tasks registered in cluster scheduler.\n              </CardDescription>\n            </div>\n\n            <div className=\"flex flex-wrap items-center gap-2\">\n              <div className=\"relative w-full sm:w-64\">\n                <Search className=\"text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2\" />\n                <Input\n                  value={search}\n                  onChange={(e) => setSearch(e.target.value)}\n                  placeholder=\"Search job name or target...\"\n                  className=\"h-8 pl-9 text-xs\"\n                />\n              </div>\n\n              <Select value={statusFilter} onValueChange={(val) => setStatusFilter(val as 'all' | JobStatus)}>\n                <SelectTrigger className=\"h-8 w-32 text-xs\">\n                  <SelectValue placeholder=\"Status\" />\n                </SelectTrigger>\n                <SelectContent>\n                  <SelectItem value=\"all\">All Statuses</SelectItem>\n                  <SelectItem value=\"active\">Active</SelectItem>\n                  <SelectItem value=\"paused\">Paused</SelectItem>\n                  <SelectItem value=\"error\">Error</SelectItem>\n                </SelectContent>\n              </Select>\n\n              <Badge variant=\"outline\" className=\"hidden h-8 items-center gap-1 font-mono text-xs md:inline-flex\">\n                <Globe className=\"size-3\" />\n                UTC\n              </Badge>\n            </div>\n          </div>\n        </CardHeader>\n\n        <CardContent className=\"p-0\">\n          <div className=\"overflow-x-auto\">\n            <Table>\n              <TableHeader>\n                <TableRow className=\"hover:bg-transparent\">\n                  <TableHead className=\"min-w-[240px]\">Job Name & Target</TableHead>\n                  <TableHead className=\"min-w-[200px]\">Schedule</TableHead>\n                  <TableHead className=\"w-20\">Timezone</TableHead>\n                  <TableHead className=\"w-28\">Status</TableHead>\n                  <TableHead className=\"min-w-[130px]\">Next Run</TableHead>\n                  <TableHead className=\"min-w-[220px]\">Last Execution</TableHead>\n                  <TableHead className=\"w-16 text-right\">Actions</TableHead>\n                </TableRow>\n              </TableHeader>\n              <TableBody>\n                {filteredJobs.map((job) => (\n                  <TableRow key={job.id} className=\"group transition-colors\">\n                    {/* Job Name & Target */}\n                    <TableCell className=\"py-3\">\n                      <div className=\"space-y-0.5\">\n                        <div className=\"flex items-center gap-1.5\">\n                          <span className=\"text-foreground text-sm font-medium\">{job.name}</span>\n                          {runningJobId === job.id && (\n                            <RefreshCw className=\"text-primary size-3.5 animate-spin\" aria-label=\"Running now\" />\n                          )}\n                        </div>\n                        <p\n                          className=\"text-muted-foreground max-w-[280px] truncate font-mono text-xs sm:max-w-[340px]\"\n                          title={job.target}\n                        >\n                          {job.target}\n                        </p>\n                      </div>\n                    </TableCell>\n\n                    {/* Cron Expression & Human Translation */}\n                    <TableCell className=\"py-3\">\n                      <div className=\"space-y-1\">\n                        <div className=\"flex items-center gap-1.5\">\n                          <code className=\"border-border bg-muted text-foreground rounded border px-1.5 py-0.5 font-mono text-xs font-semibold\">\n                            {job.cronExpression}\n                          </code>\n                        </div>\n                        <p className=\"text-muted-foreground flex items-center gap-1 text-xs\">{job.humanSchedule}</p>\n                      </div>\n                    </TableCell>\n\n                    {/* Timezone */}\n                    <TableCell className=\"py-3\">\n                      <span className=\"text-muted-foreground font-mono text-xs font-medium\">{job.timezone}</span>\n                    </TableCell>\n\n                    {/* Status Badge */}\n                    <TableCell className=\"py-3\">\n                      {job.status === 'active' && (\n                        <Badge variant=\"success\" className=\"gap-1 text-xs\">\n                          <span className=\"bg-success size-1.5 animate-pulse rounded-full\" />\n                          Active\n                        </Badge>\n                      )}\n                      {job.status === 'paused' && (\n                        <Badge variant=\"secondary\" className=\"gap-1 text-xs\">\n                          <Pause className=\"size-3\" />\n                          Paused\n                        </Badge>\n                      )}\n                      {job.status === 'error' && (\n                        <Badge variant=\"destructive\" className=\"gap-1 text-xs\">\n                          <AlertCircle className=\"size-3\" />\n                          Error\n                        </Badge>\n                      )}\n                    </TableCell>\n\n                    {/* Next Run */}\n                    <TableCell className=\"py-3\">\n                      <div className=\"flex items-center gap-1.5 text-xs\">\n                        <Clock className=\"text-muted-foreground size-3.5 shrink-0\" />\n                        <span\n                          className={job.status === 'paused' ? 'text-muted-foreground' : 'text-foreground font-medium'}\n                        >\n                          {job.nextRun}\n                        </span>\n                      </div>\n                    </TableCell>\n\n                    {/* Last Execution */}\n                    <TableCell className=\"py-3\">\n                      <div className=\"space-y-0.5\">\n                        <div className=\"flex items-center gap-1.5\">\n                          {job.lastExecution.status === 'success' ? (\n                            <CheckCircle2 className=\"text-success size-3.5 shrink-0\" />\n                          ) : (\n                            <XCircle className=\"text-destructive size-3.5 shrink-0\" />\n                          )}\n                          <span\n                            className={cn(\n                              'font-mono text-xs font-medium',\n                              job.lastExecution.status === 'success' ? 'text-success' : 'text-destructive',\n                            )}\n                          >\n                            {job.lastExecution.code}\n                          </span>\n                          <span className=\"text-muted-foreground font-mono text-xs\">\n                            · {job.lastExecution.duration}\n                          </span>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs\">{job.lastExecution.timestamp}</p>\n                      </div>\n                    </TableCell>\n\n                    {/* Action Menu */}\n                    <TableCell className=\"py-3 text-right\">\n                      <DropdownMenu>\n                        <DropdownMenuTrigger asChild>\n                          <Button variant=\"ghost\" size=\"icon\" className=\"size-8\">\n                            <MoreHorizontal className=\"size-4\" />\n                            <span className=\"sr-only\">Open actions</span>\n                          </Button>\n                        </DropdownMenuTrigger>\n                        <DropdownMenuContent align=\"end\" className=\"w-48\">\n                          <DropdownMenuLabel>Job Actions</DropdownMenuLabel>\n                          <DropdownMenuSeparator />\n                          <DropdownMenuItem onClick={() => triggerRun(job)}>\n                            <Play className=\"text-success mr-2 size-4\" />\n                            Run Now\n                          </DropdownMenuItem>\n                          <DropdownMenuItem onClick={() => togglePause(job)}>\n                            {job.status === 'active' ? (\n                              <>\n                                <Pause className=\"mr-2 size-4\" />\n                                Pause Schedule\n                              </>\n                            ) : (\n                              <>\n                                <Play className=\"mr-2 size-4\" />\n                                Resume Schedule\n                              </>\n                            )}\n                          </DropdownMenuItem>\n                          <DropdownMenuItem onClick={() => openLogs(job)}>\n                            <Terminal className=\"mr-2 size-4\" />\n                            View Logs\n                          </DropdownMenuItem>\n                          <DropdownMenuItem onClick={() => applyPreset(job.cronExpression)}>\n                            <Pencil className=\"mr-2 size-4\" />\n                            Inspect in Helper\n                          </DropdownMenuItem>\n                          <DropdownMenuSeparator />\n                          <DropdownMenuItem\n                            className=\"text-destructive focus:text-destructive\"\n                            onClick={() => deleteJob(job.id)}\n                          >\n                            <Trash2 className=\"mr-2 size-4\" />\n                            Delete Job\n                          </DropdownMenuItem>\n                        </DropdownMenuContent>\n                      </DropdownMenu>\n                    </TableCell>\n                  </TableRow>\n                ))}\n\n                {filteredJobs.length === 0 && (\n                  <TableRow>\n                    <TableCell colSpan={7} className=\"text-muted-foreground h-28 text-center text-sm\">\n                      No scheduled jobs found matching the active filter.\n                    </TableCell>\n                  </TableRow>\n                )}\n              </TableBody>\n            </Table>\n          </div>\n        </CardContent>\n      </Card>\n\n      {/* Cron Expression Helper Card */}\n      <Card className=\"shadow-xs\">\n        <CardHeader>\n          <div className=\"flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between\">\n            <div className=\"space-y-1\">\n              <div className=\"flex items-center gap-2\">\n                <Terminal className=\"text-primary size-4\" />\n                <CardTitle className=\"text-lg font-semibold\">Interactive Cron Expression Helper</CardTitle>\n              </div>\n              <CardDescription className=\"text-xs\">\n                Generate standard 5-part cron syntax with real-time translation and upcoming execution previews.\n              </CardDescription>\n            </div>\n\n            {/* Quick Presets */}\n            <div className=\"flex flex-wrap items-center gap-1.5 pt-2 sm:pt-0\">\n              <span className=\"text-muted-foreground text-xs\">Presets:</span>\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                className=\"h-7 font-mono text-xs\"\n                onClick={() => applyPreset('*/15 * * * *')}\n              >\n                */15 * * * *\n              </Button>\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                className=\"h-7 font-mono text-xs\"\n                onClick={() => applyPreset('0 * * * *')}\n              >\n                0 * * * *\n              </Button>\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                className=\"h-7 font-mono text-xs\"\n                onClick={() => applyPreset('0 0 * * *')}\n              >\n                0 0 * * *\n              </Button>\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                className=\"h-7 font-mono text-xs\"\n                onClick={() => applyPreset('0 9 * * 1')}\n              >\n                0 9 * * 1\n              </Button>\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                className=\"h-7 font-mono text-xs\"\n                onClick={() => applyPreset('0 0 1 * *')}\n              >\n                0 0 1 * *\n              </Button>\n            </div>\n          </div>\n        </CardHeader>\n\n        <CardContent className=\"space-y-6\">\n          {/* Frequency Selector Buttons */}\n          <div className=\"flex flex-wrap gap-2\">\n            {(['minute', 'hour', 'day', 'week', 'month'] as Frequency[]).map((freq) => (\n              <Button\n                key={freq}\n                variant={helperFrequency === freq ? 'default' : 'outline'}\n                size=\"sm\"\n                className=\"text-xs capitalize\"\n                onClick={() => setHelperFrequency(freq)}\n              >\n                Every {freq}\n              </Button>\n            ))}\n          </div>\n\n          {/* Dynamic Frequency Inputs Grid */}\n          <div className=\"border-border bg-muted/40 grid grid-cols-1 gap-4 rounded-lg border p-4 sm:grid-cols-2 lg:grid-cols-3\">\n            {/* Minute Controls */}\n            {helperFrequency === 'minute' && (\n              <div className=\"space-y-2\">\n                <label className=\"text-foreground text-xs font-medium\">Interval Interval</label>\n                <Select value={helperMinuteInterval} onValueChange={setHelperMinuteInterval}>\n                  <SelectTrigger className=\"bg-card h-9 w-full text-xs\">\n                    <SelectValue placeholder=\"Select interval\" />\n                  </SelectTrigger>\n                  <SelectContent>\n                    <SelectItem value=\"1\">Every 1 minute (* * * * *)</SelectItem>\n                    <SelectItem value=\"5\">Every 5 minutes (*/5 * * * *)</SelectItem>\n                    <SelectItem value=\"10\">Every 10 minutes (*/10 * * * *)</SelectItem>\n                    <SelectItem value=\"15\">Every 15 minutes (*/15 * * * *)</SelectItem>\n                    <SelectItem value=\"30\">Every 30 minutes (*/30 * * * *)</SelectItem>\n                  </SelectContent>\n                </Select>\n              </div>\n            )}\n\n            {/* Hour Controls */}\n            {helperFrequency === 'hour' && (\n              <div className=\"space-y-2\">\n                <label className=\"text-foreground text-xs font-medium\">Minute of the Hour</label>\n                <Select value={helperHourlyMinute} onValueChange={setHelperHourlyMinute}>\n                  <SelectTrigger className=\"bg-card h-9 w-full text-xs\">\n                    <SelectValue placeholder=\"Select minute\" />\n                  </SelectTrigger>\n                  <SelectContent>\n                    <SelectItem value=\"0\">At minute :00 (Top of hour)</SelectItem>\n                    <SelectItem value=\"15\">At minute :15 (Quarter past)</SelectItem>\n                    <SelectItem value=\"30\">At minute :30 (Half past)</SelectItem>\n                    <SelectItem value=\"45\">At minute :45 (Quarter to)</SelectItem>\n                  </SelectContent>\n                </Select>\n              </div>\n            )}\n\n            {/* Day Controls */}\n            {helperFrequency === 'day' && (\n              <>\n                <div className=\"space-y-2\">\n                  <label className=\"text-foreground text-xs font-medium\">Execution Hour (UTC)</label>\n                  <Select value={helperDailyHour} onValueChange={setHelperDailyHour}>\n                    <SelectTrigger className=\"bg-card h-9 w-full text-xs\">\n                      <SelectValue placeholder=\"Select hour\" />\n                    </SelectTrigger>\n                    <SelectContent>\n                      <SelectItem value=\"0\">00:00 (Midnight)</SelectItem>\n                      <SelectItem value=\"4\">04:00 (Early Morning)</SelectItem>\n                      <SelectItem value=\"9\">09:00 (Morning)</SelectItem>\n                      <SelectItem value=\"12\">12:00 (Noon)</SelectItem>\n                      <SelectItem value=\"18\">18:00 (Evening)</SelectItem>\n                      <SelectItem value=\"23\">23:00 (Late Night)</SelectItem>\n                    </SelectContent>\n                  </Select>\n                </div>\n                <div className=\"space-y-2\">\n                  <label className=\"text-foreground text-xs font-medium\">Minute (UTC)</label>\n                  <Select value={helperDailyMinute} onValueChange={setHelperDailyMinute}>\n                    <SelectTrigger className=\"bg-card h-9 w-full text-xs\">\n                      <SelectValue placeholder=\"Select minute\" />\n                    </SelectTrigger>\n                    <SelectContent>\n                      <SelectItem value=\"0\">:00</SelectItem>\n                      <SelectItem value=\"15\">:15</SelectItem>\n                      <SelectItem value=\"30\">:30</SelectItem>\n                      <SelectItem value=\"45\">:45</SelectItem>\n                    </SelectContent>\n                  </Select>\n                </div>\n              </>\n            )}\n\n            {/* Week Controls */}\n            {helperFrequency === 'week' && (\n              <>\n                <div className=\"space-y-2\">\n                  <label className=\"text-foreground text-xs font-medium\">Day of Week</label>\n                  <Select value={helperWeekDay} onValueChange={setHelperWeekDay}>\n                    <SelectTrigger className=\"bg-card h-9 w-full text-xs\">\n                      <SelectValue placeholder=\"Select day\" />\n                    </SelectTrigger>\n                    <SelectContent>\n                      <SelectItem value=\"1\">Monday (1)</SelectItem>\n                      <SelectItem value=\"2\">Tuesday (2)</SelectItem>\n                      <SelectItem value=\"3\">Wednesday (3)</SelectItem>\n                      <SelectItem value=\"4\">Thursday (4)</SelectItem>\n                      <SelectItem value=\"5\">Friday (5)</SelectItem>\n                      <SelectItem value=\"6\">Saturday (6)</SelectItem>\n                      <SelectItem value=\"0\">Sunday (0)</SelectItem>\n                    </SelectContent>\n                  </Select>\n                </div>\n                <div className=\"space-y-2\">\n                  <label className=\"text-foreground text-xs font-medium\">Time (UTC)</label>\n                  <Select value={helperWeekHour} onValueChange={setHelperWeekHour}>\n                    <SelectTrigger className=\"bg-card h-9 w-full text-xs\">\n                      <SelectValue placeholder=\"Select hour\" />\n                    </SelectTrigger>\n                    <SelectContent>\n                      <SelectItem value=\"0\">00:00 (Midnight)</SelectItem>\n                      <SelectItem value=\"9\">09:00 (Morning)</SelectItem>\n                      <SelectItem value=\"12\">12:00 (Noon)</SelectItem>\n                      <SelectItem value=\"18\">18:00 (Evening)</SelectItem>\n                    </SelectContent>\n                  </Select>\n                </div>\n              </>\n            )}\n\n            {/* Month Controls */}\n            {helperFrequency === 'month' && (\n              <>\n                <div className=\"space-y-2\">\n                  <label className=\"text-foreground text-xs font-medium\">Day of Month</label>\n                  <Select value={helperMonthDay} onValueChange={setHelperMonthDay}>\n                    <SelectTrigger className=\"bg-card h-9 w-full text-xs\">\n                      <SelectValue placeholder=\"Select day of month\" />\n                    </SelectTrigger>\n                    <SelectContent>\n                      <SelectItem value=\"1\">1st of the month</SelectItem>\n                      <SelectItem value=\"15\">15th (Mid-month)</SelectItem>\n                      <SelectItem value=\"28\">28th of the month</SelectItem>\n                    </SelectContent>\n                  </Select>\n                </div>\n                <div className=\"space-y-2\">\n                  <label className=\"text-foreground text-xs font-medium\">Time (UTC)</label>\n                  <Select value={helperMonthHour} onValueChange={setHelperMonthHour}>\n                    <SelectTrigger className=\"bg-card h-9 w-full text-xs\">\n                      <SelectValue placeholder=\"Select hour\" />\n                    </SelectTrigger>\n                    <SelectContent>\n                      <SelectItem value=\"0\">00:00 (Midnight)</SelectItem>\n                      <SelectItem value=\"9\">09:00 (Morning)</SelectItem>\n                      <SelectItem value=\"12\">12:00 (Noon)</SelectItem>\n                    </SelectContent>\n                  </Select>\n                </div>\n              </>\n            )}\n\n            <div className=\"flex flex-col justify-end space-y-2 sm:col-span-2 lg:col-span-1\">\n              <label className=\"text-foreground text-xs font-medium\">Target Cluster Timezone</label>\n              <div className=\"border-border bg-card text-muted-foreground flex h-9 items-center gap-2 rounded-md border px-3 text-xs\">\n                <Globe className=\"text-primary size-3.5\" />\n                <span>UTC (Coordinated Universal)</span>\n              </div>\n            </div>\n          </div>\n\n          {/* Generated Syntax & Next 3 Runs Output */}\n          <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n            {/* Left: Expression and Humanized Label */}\n            <div className=\"border-border bg-card space-y-3 rounded-lg border p-4\">\n              <div className=\"flex items-center justify-between\">\n                <span className=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n                  Generated Syntax\n                </span>\n                <Button\n                  variant=\"outline\"\n                  size=\"sm\"\n                  className=\"h-7 gap-1.5 text-xs\"\n                  onClick={() => copyExpression(currentCronExpression)}\n                >\n                  {copiedCron ? <Check className=\"text-success size-3\" /> : <Copy className=\"size-3\" />}\n                  {copiedCron ? 'Copied' : 'Copy Cron'}\n                </Button>\n              </div>\n\n              <div className=\"border-border bg-muted/60 rounded-md border p-3\">\n                <code className=\"text-foreground font-mono text-lg font-bold\">{currentCronExpression}</code>\n              </div>\n\n              <div className=\"text-muted-foreground flex items-center gap-2 text-xs\">\n                <CalendarClock className=\"text-primary size-4 shrink-0\" />\n                <span>{currentHumanTranslation}</span>\n              </div>\n            </div>\n\n            {/* Right: Next 3 Runs Preview */}\n            <div className=\"border-border bg-card space-y-3 rounded-lg border p-4\">\n              <div className=\"flex items-center justify-between\">\n                <span className=\"text-muted-foreground text-xs font-medium tracking-wider uppercase\">\n                  Next 3 Scheduled Runs (UTC)\n                </span>\n                <Badge variant=\"outline\" className=\"font-mono text-xs\">\n                  Simulated\n                </Badge>\n              </div>\n\n              <div className=\"space-y-2\">\n                {nextExecutionsPreview.map((run, idx) => (\n                  <div\n                    key={idx}\n                    className=\"border-border bg-muted/40 flex items-center justify-between rounded-md border px-3 py-2 text-xs\"\n                  >\n                    <div className=\"flex items-center gap-2\">\n                      <span className=\"text-muted-foreground font-mono font-semibold\">{idx + 1}.</span>\n                      <span className=\"text-foreground font-mono font-medium\">{run.time}</span>\n                    </div>\n                    <Badge variant=\"secondary\" className=\"text-xs font-normal\">\n                      {run.relative}\n                    </Badge>\n                  </div>\n                ))}\n              </div>\n            </div>\n          </div>\n        </CardContent>\n      </Card>\n\n      {/* Dialog: Create New Cron Job */}\n      <Dialog open={isCreateOpen} onOpenChange={setIsCreateOpen}>\n        <DialogContent className=\"sm:max-w-lg\">\n          <DialogHeader>\n            <DialogTitle>New Cron Job</DialogTitle>\n            <DialogDescription>\n              Schedule a background worker function or HTTP endpoint target on a recurring cron interval.\n            </DialogDescription>\n          </DialogHeader>\n\n          <div className=\"space-y-4 py-2\">\n            <div className=\"space-y-1.5\">\n              <label htmlFor=\"new-job-name-react\" className=\"text-foreground text-xs font-medium\">\n                Job Name / Identifier\n              </label>\n              <Input\n                id=\"new-job-name-react\"\n                value={newJobName}\n                onChange={(e) => setNewJobName(e.target.value)}\n                placeholder=\"e.g. sync-stripe-disputes\"\n              />\n            </div>\n\n            <div className=\"space-y-1.5\">\n              <label htmlFor=\"new-job-target-react\" className=\"text-foreground text-xs font-medium\">\n                Target Endpoint / Worker Handler\n              </label>\n              <Input\n                id=\"new-job-target-react\"\n                value={newJobTarget}\n                onChange={(e) => setNewJobTarget(e.target.value)}\n                placeholder=\"POST https://api.acme.corp/v1/stripe/disputes\"\n              />\n            </div>\n\n            <div className=\"grid grid-cols-2 gap-3\">\n              <div className=\"space-y-1.5\">\n                <label htmlFor=\"new-job-cron-react\" className=\"text-foreground text-xs font-medium\">\n                  Cron Expression\n                </label>\n                <Input\n                  id=\"new-job-cron-react\"\n                  value={newJobCron}\n                  onChange={(e) => setNewJobCron(e.target.value)}\n                  placeholder=\"0 4 * * *\"\n                  className=\"font-mono text-xs\"\n                />\n              </div>\n\n              <div className=\"space-y-1.5\">\n                <label htmlFor=\"new-job-tz-react\" className=\"text-foreground text-xs font-medium\">\n                  Timezone\n                </label>\n                <Select value={newJobTimezone} onValueChange={setNewJobTimezone}>\n                  <SelectTrigger id=\"new-job-tz-react\" className=\"text-xs\">\n                    <SelectValue placeholder=\"Timezone\" />\n                  </SelectTrigger>\n                  <SelectContent>\n                    <SelectItem value=\"UTC\">UTC (Universal)</SelectItem>\n                    <SelectItem value=\"America/New_York\">America/New_York (EST)</SelectItem>\n                    <SelectItem value=\"America/Los_Angeles\">America/Los_Angeles (PST)</SelectItem>\n                    <SelectItem value=\"Europe/London\">Europe/London (GMT)</SelectItem>\n                  </SelectContent>\n                </Select>\n              </div>\n            </div>\n          </div>\n\n          <DialogFooter>\n            <Button variant=\"outline\" onClick={() => setIsCreateOpen(false)}>\n              Cancel\n            </Button>\n            <Button disabled={!newJobName.trim()} onClick={handleCreateJob}>\n              Create Cron Job\n            </Button>\n          </DialogFooter>\n        </DialogContent>\n      </Dialog>\n\n      {/* Dialog: View Execution Logs */}\n      <Dialog open={isLogsOpen} onOpenChange={setIsLogsOpen}>\n        <DialogContent className=\"sm:max-w-2xl\">\n          <DialogHeader>\n            <div className=\"flex items-center gap-2\">\n              <Terminal className=\"text-primary size-5\" />\n              <DialogTitle className=\"font-mono text-base\">{selectedJobForLogs?.name}</DialogTitle>\n            </div>\n            <DialogDescription className=\"font-mono text-xs\">\n              Target: {selectedJobForLogs?.target} · Schedule: {selectedJobForLogs?.cronExpression}\n            </DialogDescription>\n          </DialogHeader>\n\n          <div className=\"space-y-3 py-1\">\n            <div className=\"border-border bg-muted/60 flex items-center justify-between rounded-md border px-3 py-2 text-xs\">\n              <div className=\"flex items-center gap-2\">\n                <span className=\"text-muted-foreground\">Latest Run:</span>\n                <span className=\"text-foreground font-mono font-medium\">\n                  {selectedJobForLogs?.lastExecution.timestamp}\n                </span>\n              </div>\n              <div className=\"flex items-center gap-2\">\n                <span className=\"text-muted-foreground\">Duration:</span>\n                <span className=\"text-foreground font-mono\">{selectedJobForLogs?.lastExecution.duration}</span>\n              </div>\n              <Badge\n                variant={selectedJobForLogs?.lastExecution.status === 'success' ? 'success' : 'destructive'}\n                className=\"font-mono text-xs\"\n              >\n                {selectedJobForLogs?.lastExecution.code}\n              </Badge>\n            </div>\n\n            {/* Terminal Output Simulation */}\n            <div className=\"border-border text-success space-y-1.5 overflow-x-auto rounded-lg border bg-black/90 p-4 font-mono text-xs dark:bg-black\">\n              <p className=\"text-muted-foreground\">\n                ❯ [scheduler] Initializing invocation container for {selectedJobForLogs?.name}...\n              </p>\n              <p className=\"text-muted-foreground\">❯ [network] Dispatching HTTP POST to target endpoint</p>\n              <p className=\"text-success\">\n                ✓ [worker] Request acknowledged with HTTP {selectedJobForLogs?.lastExecution.code}\n              </p>\n              {selectedJobForLogs?.lastExecution.status === 'error' ? (\n                <p className=\"text-destructive\">\n                  ✖ [error] Endpoint returned 504 Gateway Timeout after 30.0s threshold. Retrying with exponential\n                  backoff (attempt 1/3).\n                </p>\n              ) : (\n                <p className=\"text-success\">\n                  ✓ [worker] Processed 1,420 queue records in {selectedJobForLogs?.lastExecution.duration}. Exit status\n                  code: 0.\n                </p>\n              )}\n              <p className=\"text-muted-foreground\">\n                ❯ [scheduler] Next scheduled execution: {selectedJobForLogs?.nextRun}\n              </p>\n            </div>\n          </div>\n\n          <DialogFooter>\n            <Button variant=\"outline\" onClick={() => setIsLogsOpen(false)}>\n              Close Logs\n            </Button>\n          </DialogFooter>\n        </DialogContent>\n      </Dialog>\n    </div>\n  )\n}\n\nexport default CronJobScheduler\n",
      "type": "registry:block",
      "target": "~/components/blocks/CronJobScheduler.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/card.json",
    "https://uipkge.dev/r/react/dialog.json",
    "https://uipkge.dev/r/react/dropdown-menu.json",
    "https://uipkge.dev/r/react/input.json",
    "https://uipkge.dev/r/react/select.json",
    "https://uipkge.dev/r/react/table.json"
  ],
  "description": "Temporal and AWS EventBridge style scheduled tasks and background cron worker manager with KPI overview, status indicators, execution details, action menus, and an interactive cron expression builder with upcoming run previews.",
  "categories": [
    "devops",
    "app",
    "dashboard"
  ]
}