Scheduled runs and their time zone
Two MAC services run tasks on a schedule: Identity and the Application Center. Most of them clean up: they delete what has passed its retention period, or warn about something that is about to expire. The schedules are cron expressions with seconds; a run at a fixed time of day counts in the zone of the schedules.
The zone
Without a setting the schedules count in UTC, the same in every operating mode. The zone of the machine or the
container does not matter. You set another zone with the setting Jobs__TimeZone (in a configuration file
Jobs:TimeZone); the value is an IANA name such as Europe/Berlin or UTC.
- A name the system does not know ends the start of the service with exit code 78. The last line of its log names
the setting
Jobs:TimeZone(see "The service does not start" in the guide for your operating mode). - One process, one zone. The zone applies to all schedules of a service. Each of the two services reads it for itself; set the same value in both, or the tasks of the services run by different clocks.
- With a zone that changes between summer and winter time, the time on the wall clock stays the same (03:15 stays
03:15) and the offset to UTC changes. What a run does whose time of day falls into the hour of the change has been
checked against the scheduler (
0 30 2 * * *inEurope/Berlin, changes on 28 March and 31 October 2027):- Spring (the clock jumps from 02:00 to 03:00): The time of day does not exist on that day. The run of that day does not happen and is not made up for; there are 47 hours between the two runs. There is no error message.
- Autumn (the clock jumps from 03:00 to 02:00): The time of day exists twice. The run happens once, on the second pass of the time of day; there are 25 hours between the two runs. If the next run is recalculated in the time between the two passes, the next run is the one of the following day, and the run of that day does not happen.
- Runs outside the hour of the change are not affected, and with UTC these cases do not exist.
With
Europe/Berlinthe hour of the change is 02:00 to 03:00; the runs of the services fall outside it. Another zone has another hour of the change; if you do not want runs in that hour, leave UTC in place.
- Tasks that run at fixed intervals (every five minutes, hourly, every six hours) do not depend on the zone.
What runs at which time
The times apply to the default, UTC; in another zone they are the same times in that zone.
| Service | Time | Task |
|---|---|---|
| Identity | 03:00 | remove unusable tokens and authorizations, delete self-registrations that were never confirmed |
| Identity | 03:10 | remove sign-in entries past their retention period |
| Identity | 03:20 | remove entries of the administrative audit trail past their retention period |
| Identity | every 5 minutes | remove security events, ended sign-ins and event streams nobody polls |
| Application Center | 03:30 | remove refusals at the gate after 90 days |
| Application Center | 04:10 | clean up the inbox of downlink results past its window |
| Application Center | 05:00 | check the plugin sources for newer versions of installed plugins |
| Identity, Application Center | 03:45 | remove finished runs past their retention period (30 days unless set otherwise) from the log of scheduled runs |
Setting the zone
Set Jobs__TimeZone for these services: identity, applicationcenter.
Kubernetes. On install or upgrade, one chart value per service:
helm upgrade mac ./mac -n mac --reuse-values \
--set services.identity.env.Jobs__TimeZone=Europe/Berlin \
--set services.applicationcenter.env.Jobs__TimeZone=Europe/Berlin
The pods are replaced with the new setting.
Docker. Put a file compose.zeitzone.yaml next to compose.yaml:
services:
identity:
environment:
Jobs__TimeZone: Europe/Berlin
applicationcenter:
environment:
Jobs__TimeZone: Europe/Berlin
docker compose -f compose.yaml -f compose.zeitzone.yaml up -d
Include the file in every later docker compose call.
Native Linux. Add the line Jobs__TimeZone=Europe/Berlin to /etc/noritec/mac/identity.env, /etc/noritec/mac/applicationcenter.env and restart the services:
sudo systemctl restart noritec-mac.target