-
Notifications
You must be signed in to change notification settings - Fork 0
Missed New Day
TownyAlerts can optionally warn administrators when it starts after the expected Towny New Day time.
This is designed for situations such as:
- The server was offline
- TownyAlerts was not installed yet
- TownyAlerts was disabled
- DiscordSRV was not ready when the normal alert should have been sent
missed-new-day:
enabled: true
lookback-hours: 12
allow-log-fallback: trueThe default recovery window is:
12 hours
TownyAlerts distinguishes between:
SCHEDULE_PASSED
and:
CONFIRMED_MISSED_NEW_DAY
These are intentionally different.
Towny's scheduling APIs can determine the expected timing of New Day.
TownyAlerts uses Towny's public timing information, including:
TimeMgmt.townyTime()
TownySettings.getDayInterval()
TimeMgmt.townyTime() represents the number of seconds until the next Towny New Day.
From the schedule, TownyAlerts can calculate that the expected previous New Day time has passed.
This does not independently prove that the New Day actually executed.
Therefore the notification uses cautious wording.
It must not invent:
- Upkeep totals
- Tax totals
- Bankrupt towns
- Fallen towns
- Fallen nations
A missed New Day is only described as confirmed when TownyAlerts has reliable evidence.
In 1.0.0-beta.3, the fallback confirmation path can use an unequivocal Towny entry from the official current log when enabled.
missed-new-day:
allow-log-fallback: trueTownyAlerts limits log inspection.
The current implementation targets:
logs/latest.log
and bounds the inspection to approximately:
- 2 MiB
- 20,000 lines
TownyAlerts does not scan unlimited historical logs.
Because only latest.log is inspected, confirmation may not be possible after log rotation or some restart scenarios.
If TownyAlerts cannot recover authoritative historical details, it sends a generic notice instead.
Current balances are never presented as if they were historical New Day balances.
Persistent SQLite/MariaDB/MySQL storage can prevent repeated missed-notice delivery for the same Towny cycle.
MEMORY mode does not persist across process restarts, so repeated starts inside the same recovery window may produce another notice.
Missed New Day detection never:
- Runs New Day
- Charges taxes
- Charges upkeep
- Executes Towny admin commands
- Changes balances
It is notification-only.
TownyAlerts — Community Towny alerts for Discord via DiscordSRV. Created by DynaDev.
TownyAlerts Wiki
- Home
- Installation
- Configuration
- Discord Setup
- Alerts and Events
- Commands and Permissions
- Languages
- Storage
- Missed New Day
- Compatibility
- Troubleshooting
- Security and Privacy
- FAQ
TownyAlerts
Created by DynaDev