Web job list says Sunday twice when the weekday field is 0,7
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, rust
- Domain
- frontend
Research direction
Read describeCron in relay/web/app.js, especially the numeric weekday mapping and the DAYS list above it. Check how 0,7 and 1,1 are rendered, then update the weekday names so duplicates are removed while keeping first-seen order. Done means each weekday appears once; the scheduler behavior in crates/formless-core/src/jobs.rs already treats 0 and 7 as Sunday.
Written by the indexing model from the issue text.
Description
What is wrong
The web job list turns a numeric weekday list into day names by mapping each value through DAYS[n % 7] and joining them, with no dedupe. Cron weekday 7 is Sunday, the same day as 0, so a schedule that runs once is described as running twice.
0 0 * * 0,7 is shown as every Sunday, Sunday at 0:00.
0 9 * * 1,1 is shown as every Monday, Monday at 9:00.
The scheduler does not fire twice. Cron::parse copies weekday bit 7 onto bit 0 and then drops index 7, so both expressions run once (Sunday, or Monday).
Where
relay/web/app.js,describeCron: the armdom === "*" && /^[0-7](,[0-7])*$/.test(dow)mapsdow.split(",").map((d) => DAYS[Number(d) % 7]).DAYSis["Sunday", ..., "Saturday"]just above that function.crates/formless-core/src/jobs.rs,Cron::parse:if dow_set[7] { dow_set[0] = true; }thendow_set.truncate(7). The file header documents0 or 7 = Sunday.
Why it matters
People write Sunday as 0, 7, or 0,7. The job list is the place they check how often a saved job runs. Listing Sunday twice reads as two firings on the same morning. A repeated number such as 1,1 has the same wording bug.
This is not #2127 (names such as MON-FRI stay raw because they fail this numeric pattern), not #2128 (every-N-hours left raw), not closed #2116 (hourly :00 wording), and not closed #2122 (@yearly / @midnight left raw).
Suggested fix
Resolve 7 to 0 (or take n % 7) and drop duplicate weekdays before joining the names, keeping first-seen order.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 12h 10m
- Merged PRs (30d)
- 780
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from athiwatc/formless
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
All issues in athiwatc/formless
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
symposium-dev/symposium#530 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
topgrade-rs/topgrade#2540 ·
Maintainers usually reply within 1 day
-
Invalid JSON options for ngram and edge_ngram silently use defaultsPossibly taken @Tilendlesa claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
noemaforge/vimanam#153 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day