Cron UI Visual Guide
Visual guide for the updated cron expression builder UI with seconds support and six-field cron format
Cron UI Visual Guide
Cron Dialog UI Changes - Visual Guide
New UI Structure
The cron expression builder form now has the following order:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
┌─────────────────────────────────────────────────┐
│ Schedule │
│ │
│ ● Every N seconds [NEW - FIRST] │
│ └─ Seconds: [5____] │
│ │
│ ○ Every N minutes │
│ └─ Minutes: [5____] │
│ │
│ ○ Every N hours │
│ └─ Hours: [1____] Minute: [0____] │
│ │
│ ○ Daily at time │
│ └─ Hour: [0____] Minute: [0____] │
│ Second: [0____] [NEW] │
│ │
│ ○ Weekly on days │
│ └─ [☐Sun ☐Mon ☐Tue ☐Wed ☐Thu ☐Fri ☐Sat] │
│ Hour: [0____] Minute: [0____] │
│ Second: [0____] [NEW] │
│ │
│ ○ Monthly on day │
│ └─ Day: [1____] Hour: [0____] │
│ Minute: [0____] Second: [0____] [NEW] │
│ │
│ ○ Custom cron expression │
│ └─ [_______________________________] │
│ │
│ Generated cron: */5 * * * * * │
└─────────────────────────────────────────────────┘
Key Changes
1. New “Every N seconds” Option
- Position: First option (above minutes)
- Default: 5 seconds
- Expression:
*/5 * * * * * - Default mode: This is now the default selection
2. Seconds Fields Added
All time-based modes now include a seconds field:
- Daily: Hour, Minute, Second
- Weekly: Hour, Minute, Second
- Monthly: Day, Hour, Minute, Second
3. Expression Format
The generated expressions now use 6 fields (with seconds):
| Mode | Old Format (5-field) | New Format (6-field) |
|---|---|---|
| Every 5 seconds | N/A | */5 * * * * * |
| Every 5 minutes | */5 * * * * | 0 */5 * * * * |
| Every 2 hours | 0 */2 * * * | 0 0 */2 * * * |
| Daily at 10:15:30 | 15 10 * * * | 30 15 10 * * * |
| Weekly Sun 12:00:30 | 0 12 * * 0 | 30 0 12 * * 0 |
| Monthly 15th 09:45:20 | 45 9 15 * * | 20 45 9 15 * * |
User Experience Flow
Creating a New Cron Job (Default)
- User creates a new Cron Timer node
- Opens the dialog
- Sees “Every N seconds” pre-selected with “5”
- Generated expression:
*/5 * * * * * - Executes every 5 seconds
Upgrading Existing Cron Jobs
- User opens existing cron job with old 5-field expression
- Dialog automatically parses and converts to appropriate mode
- Legacy expressions like
*/5 * * * *are recognized as “Every 5 minutes” - User can add seconds precision by switching modes or using custom
Fine-tuning Time-based Schedules
- User selects “Daily at time”
- Sets Hour: 14, Minute: 30, Second: 15
- Expression:
15 30 14 * * * - Executes daily at exactly 14:30:15
Backward Compatibility
✅ Old 5-field expressions continue to work:
*/5 * * * *→ Interpreted as every 5 minutes at second 00 9 * * 1→ Interpreted as Monday 09:00:00
✅ Expression parsing handles both formats automatically
Default Behavior
| Scenario | Default Expression | Executes |
|---|---|---|
| New cron job | */5 * * * * * | Every 5 seconds |
| Blank expression | */5 * * * * * | Every 5 seconds |
Common Use Cases
High-Frequency Monitoring
1
2
3
4
Mode: Every N seconds
Seconds: 1
Expression: */1 * * * * *
Result: Executes every second (max frequency)
Regular Sensor Polling
1
2
3
4
Mode: Every N seconds
Seconds: 10
Expression: */10 * * * * *
Result: Executes every 10 seconds
Precise Daily Task
1
2
3
4
5
6
Mode: Daily at time
Hour: 3
Minute: 30
Second: 0
Expression: 0 30 3 * * *
Result: Executes at 3:30:00 AM daily
Weekly Backup with Offset
1
2
3
4
5
6
7
Mode: Weekly on days
Days: Sunday selected
Hour: 2
Minute: 0
Second: 30
Expression: 30 0 2 * * 0
Result: Executes at 2:00:30 AM every Sunday
Field Constraints
| Field | Range | Description |
|---|---|---|
| Second | 0-59 | Seconds within the minute |
| Minute | 0-59 | Minutes within the hour |
| Hour | 0-23 | Hour of the day (24-hour) |
| Day | 1-31 | Day of the month |
| Month | 1-12 | Month of the year |
| Day of Week | 0-6 | Sunday (0) through Saturday (6) |
Custom Expression Format
For advanced users, custom 6-field cron expressions are supported:
1
2
3
4
5
6
7
8
[second] [minute] [hour] [day] [month] [day_of_week]
Examples:
*/30 * * * * * - Every 30 seconds
0,30 * * * * * - At 0 and 30 seconds each minute
15 0,30 * * * * - At 15 seconds past 0 and 30 minutes
0 0 12 * * 1-5 - 12:00:00 PM on weekdays
*/5 0-30 9-17 * * 1-5 - Every 5 seconds, minutes 0-30, hours 9 AM-5 PM, weekdays
UI Screenshots
Default View (Every N seconds)
Default view showing “Every N seconds” selected with 5 seconds
Daily Schedule
Daily schedule with seconds precision
Custom Expression
Custom 6-field cron expression
Tips for Users
- Start simple: Use “Every N seconds” for most monitoring tasks
- Be precise: Add seconds to daily/weekly tasks for exact timing
- Test first: Use a test node to verify your cron timing
- Check logs: Monitor execution logs to confirm schedule
- Use custom: Advanced patterns require custom expression mode
Related Documents
Summary
The updated cron UI provides:
- ✅ Second-level precision for all scheduling modes
- ✅ Intuitive “Every N seconds” as default
- ✅ Full backward compatibility with existing cron jobs
- ✅ Clear visual feedback with generated expression display
- ✅ Support for both simple and complex scheduling needs
This makes Krill’s scheduler one of the most flexible and user-friendly in the IoT automation space.
This post is licensed under CC BY 4.0 by the author.