Timer string format


#1

Timer strings are used in both refresh.timer stetting and timer services as the timer: .. app property. See Refresh scheduling on specific days of the month for details on how the syntax conceived and evolved over time.

The format is:

eventlist = eventset *( ",," eventset )
eventset = wdaylist / timelist / wdaylist "," timelist

wdaylist = wdayset *( "," wdayset )
wdayset = wday / wdayspan
wday =  ( "sun" / "mon" / "tue" / "wed" / "thu" / "fri" / "sat" ) [ DIGIT ]
wdayspan = wday "-" wday

timelist = timeset *( "," timeset )
timeset = time / timespan
time = 2DIGIT ":" 2DIGIT
timespan = time ( "-" / "~" ) time [ "/" count ]
count = n*DIGIT

Clock times are always specified in 24H format.

Most common recurring timers:

  • 00:00-24:00/24
    Every hour on the hour

  • 00:00-24:00/48
    Every 30 minutes

  • 00:00-24:00/96
    Every 15 mintues

  • 12:00-13:00/12
    Every 5 minutes from 12:00 to 13:10

  • 23:00
    Every day at 23:00

More specific timer examples:

  • mon,10:00,,fri,15:00
    Mondays at 10:00, Fridays at 15:10

  • mon,fri,10:00,15:00
    Mondays at 10:00 and 15:00, Fridays at 10:00 and 15:00

  • mon-wed,fri,9:00-11:00/2
    Monday to Wednesday and on Friday, twice between 9:00 and 11:00

  • mon,9:00~11:00,,wed,22:00~23:00
    Mondays, some time between 9:00 and 11:00, and on Wednesdays, some time between 22:00 and 23:00

  • mon,wed
    Monday and on Wednesday, at 0:00

  • mon2-wed2,23:00-24:00
    Monday through Wednesday on the 2nd week of the month, between 23:00 and 24:00

  • fri5,23:00-01:00
    Last Friday of the month, from 23:00 to 1:00 the next day


Add support for service timers
System options
Snapd 2.35.2: ERROR run hook "configure": cannot set "core.schedule": unsupported system option
System options