Conversation
_parsePeriod only supported yearly/hourly/daily/weekly/monthly, so there was no way to create or modify a minute-recurring cron job (incunit=minute) via $lib.cron.add(period=...) / $lib.cron.mod(period=...). Add a 'minutely[/N]' periodicity that yields incunit='minute', incval=N (default 1), with an empty reqdict. A time-of-day specifier is rejected since minute is the smallest unit. incval bounds are enforced by ApptRec.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4986 +/- ##
=======================================
Coverage 97.79% 97.79%
=======================================
Files 301 301
Lines 64345 64356 +11
=======================================
+ Hits 62924 62935 +11
Misses 1421 1421 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…N-11090) - Reject a time specifier on a minutely period before parsing it, so 'minutely@blorp' reports the intended error instead of 'Invalid hour value'. - Fix the hourly invalid-increment message to actually interpolate the value (missing f-string prefix).
OCBender
approved these changes
Jul 10, 2026
vEpiphyte
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
_parsePeriod(synapse/lib/stormtypes.py) only acceptedyearly/hourly/daily/weekly/monthly, so there was no way to create or modify a minute-recurring cron job (incunit=minute, i.e. "run every N minutes") through$lib.cron.add(period=...)or$lib.cron.mod(period=...). Such jobs could previously only be created via the deprecated increment kwargs ($lib.cron.add(minute='+N'), EOL v3.0.0), and existing/migrated minute jobs could not have their schedule modified at all.Change
Add a
minutely[/N]periodicity to the--periodgrammar:minutely->incunit='minute',incval=1, empty reqdictminutely/N-> every N minutes (via the existing_parseIncval, matchinghourly/dailysemantics)@timespecifier is rejected (BadConfValu) since minute is the smallest unitApptRecbounds (1 <= N <= 2_592_000)No
agenda.pychange is needed; the data model already supportsTimeUnit.MINUTE. Bothcron.addandcron.modfunnel through_parsePeriod, so both are covered. Help text (addcrondescr/modcrondescr) updated; the command reference is auto-generated from it.Tests
synapse/tests/test_lib_agenda.py: positive add cases (minutely,minutely/5), mod + round-trip (minutely/10->hourly->minutely), and sad paths (minutely@:30,minutely/newp,minutely/0).Test plan
python -m pytest synapse/tests/test_lib_agenda.py -vruff check synapse/lib/stormtypes.py synapse/lib/storm.py synapse/tests/test_lib_agenda.py