shadcn.io is not affiliated with official shadcn/ui
Scheduled Task Cron Notification Block for Vue
A scheduled task read back in plain words: a select of four presets rewrites the cron expression, the sentence and the next three runs in UTC, with the last run and a Run now that queues a manual run in the demo.
Installation
Overview
Make a schedule readable before anyone relies on it, with this scheduled task notification for Vue with Ark UI. It is Cronfield, a job scheduler, in a hairline frame with a plus mark on each corner. A Native Select offers four presets: Every day at 03:00, Every Monday at 09:00, Every 15 minutes and First of the month. Choosing one rewrites the cron expression in mono, the sentence that says what it means and the next three runs, each worked out in UTC from the page's fixed now. Under them a Data List holds the last run and its result in a Badge. Run now is the one Shine Button: it says "Queued (demo)" and counts the manual runs on the page. Guides draw the lines. For job schedulers, report builders and any form that takes a cron.
FAQ
How do I add my own schedules?
Edit PRESETS: each has an id, a label, its cron text, a sentence, a kind of period or month, an anchor (a run you know, in UTC) and, for a period, its length in milliseconds. AS_OF is the page's fixed now, and the last and next runs are counted from the anchor, so they read the same for everyone. In your app compute them with your scheduler's own library.
What does Run now do?
Nothing leaves the page. It says "Queued (demo)" and how many manual runs have been asked for on this page; no job exists. The last run and its result are typed. In your app call your scheduler's trigger endpoint from runNow and put its answer in the status line.
Why are all the times in UTC?
A cron expression has no time zone of its own, and a page that guessed the viewer's would read differently for everyone. Every time here is UTC and says so. In your app format them in the zone your scheduler runs in, and show that zone next to the expression.