Skip to content

User friendly automation scheduling without cron#1150

Open
ClaireGz wants to merge 5 commits into
mainfrom
feat/1130-friendly-automation-scheduling
Open

User friendly automation scheduling without cron#1150
ClaireGz wants to merge 5 commits into
mainfrom
feat/1130-friendly-automation-scheduling

Conversation

@ClaireGz

@ClaireGz ClaireGz commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Issue

Closes #1130

Implemented

  • Replace the raw-cron trigger with friendly pickers: hourly (free minute), daily, weekdays, weekly (multiple days), monthly (days 1–31), each with an HH:MM time
  • Keep an Advanced (raw cron) option showing a live human-readable description
  • Times run in the server timezone (shown in the UI)

Tests done

  • Unit tests for cron build/parse round-trips across all frequencies
  • ESLint/Prettier CI green
  • Checked UI - screenshot below
image

Replace the raw-cron-only escape hatch in the automation schedule trigger
with friendly pickers: pick a frequency (hourly, daily, weekdays, weekly,
monthly) and a time (HH:MM), day of week, or day of month, and the cron is
generated under the hood. An "Advanced (cron)" option preserves raw cron
input for power users, with a live human-readable description.

Add cron-schedule helpers (build/parse/describe) with unit tests. Times are
interpreted in the server timezone, consistent with existing backend behavior
and the "server time" labels in the details sidebar.

Closes #1130

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

URL https://pr-1150-63a5c54.preview.getnao.io
Commit 63a5c54

⚠️ No LLM API keys configured - you'll see the API key setup flow when trying to chat.


Preview will be automatically removed when this PR is closed.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/frontend/src/components/automations-form.tsx Outdated
Comment thread apps/frontend/src/lib/cron-schedule.test.ts
ClaireGz and others added 4 commits July 11, 2026 12:59
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the frequency select inline right after the "On schedule" label so the
granularity and its time/day inputs read left-to-right as a single phrase
(e.g. "On schedule [Daily] at [09:00]"), with the delete icon pinned right.
Frequency-specific controls flow inline via fragments in a wrapping flex row.
Layout only; cron generation is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extend the friendly monthly day-of-month picker to cover all valid cron
day-of-month values (1-31) and widen the build/parse clamps so schedules on
the 29th-31st round-trip and stay in the friendly UI instead of falling back
to Advanced. Strengthen the cron round-trip test to assert every relevant
field per frequency and add a day-31 monthly case.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Weekly schedules now accept any combination of days via an inline toggle-button
group (Mon-Sun), emitting a sorted comma-separated cron day list (e.g.
0 8 * * 1,3,5). Single-day and Sunday (0/7) still round-trip, and the explicit
Weekdays 1-5 preset is preserved; at least one day stays selected so the day
field is never empty. Hourly now uses a free numeric minute input (0-59) instead
of a 5-minute select, so any minute round-trips.

Extend cron-schedule tests: weekly multi-day and single-day round-trips, 1-5 vs
comma-list mapping, and a non-multiple-of-5 hourly minute.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ClaireGz ClaireGz changed the title feat(frontend): friendly automation scheduling instead of raw cron Friendly automation scheduling without raw cron Jul 13, 2026
@ClaireGz ClaireGz changed the title Friendly automation scheduling without raw cron User friendly automation scheduling without cron Jul 13, 2026

@Bl3f Bl3f left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Advanced mode visual is truncated. I also think we can remove the "Monthly on the 1st at 08:00" because when complex cron it writes "Custom schedule" which is useless and takes a row visually for nothing.

I'd also be in favour of putting space between the "On schedule" and the different inputs so it's aligned right like it was before.

Screenshot 2026-07-15 at 17 24 51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Friendly automation scheduling (daily at HH:MM) instead of raw cron

2 participants