The parser has landed. I already have the code replacing refresh.schedule
with refresh.timer
but after some thought I need additional clarification from @niemeyer.
# use format compatible with the old parser
$ sudo snap set core refresh.timer=12:00-13:10
$ sudo snap set core refresh.schedule=""
$ snap refresh --time
schedule: 12:00-13:10
$ snap refresh --timer
timer: 12:00-13:10
# incompatible with old parser
$ sudo snap set core refresh.timer=mon,12:00-13:10
$ sudo snap set core refresh.schedule=""
$ snap refresh --time
schedule: mon,12:00-13:00 # cut-n-paste to refresh.schedule will fail
$ snap refresh --timer
timer: mon,12:00-13:10
And there’a perculiar case of refresh.schedule=managed
. For now I have assumed that refresh.schedule == managed
takes priority over refresh.timer
.
Edit: proposed changes are in this PR: https://github.com/snapcore/snapd/pull/4476