Rust Wiki

Server Wipe Timer

image.png

On the lowest level of Nuclear Missile Silo monument, you might notice a nuclear warhead connected to a small laptop with timer on it. This is not a random countdown timer - in fact, this timer, labeled "REPOPULATION UNIT SURVIVAL TEST", is counting down until the next server wipe. This will also decide when server should start running endgame events, so it's important to keep this timer accurate with your server's wipe schedule.

Endgame Events

On the last day of (24 hours before) every wipe cycle, the server will start two endgame events. (Within a hour, and this can be changed with the eventschedulewipeoffset.event_hours_before_wipe variable. Set 0 to disable it.)

F-15E Strike Eagle Inbound

F-15E "Strike Eagle" jets will start observing the island. You will hear an aggressive sound of a jet flying by. This event has no direct impact on game play. Since this is a event, you can start it whenever you want using the spawn f15e command.

Road Bradleys

Scientists on island will be increased, and Bradley APCs will start roaming on random roads, attacking anything they spot. The amount of APCs is dictated by size of your map: WorldSize / 1000 * 2. You can manually spawn a road Bradley by looking at a road and using the spawnroadbradley command. It stays on the same road traversing back and forth.

How does the timer work?

The default configuration aligns with force wipes so it shouldn't need any changing for most people. Make sure the time is set correctly on your servers!

The timer is calculated using your server wipe tag (monthly/biweekly/weekly), wipetimer.wipeTimezone, wipetimer.wipeDayofWeek and wipetimer.wipeHourofDay convars, however you can override these with either wipetimer.wipeUnixTimestampOverride or wipetimer.wipecronoverride convars.

This means that you have three schedule "formats" – monthly, bi-weekly and weekly, and by default:

  • Monthly: First Thursday every month at 19:00 (London time)
  • Weekly: Every Thursday at 19:00 (London time)
  • Biweekly: First and third Thursday of each month at 19:00 (London time), but splits 3 week gaps into 2+1 weeks for months with 5 weeks

If you change settings to Wednesday at 1 PM, and your server is weekly, then timer will reach 00:00:00:00 every week, exactly on Wednesday, 1pm (London time). If your server is running shorter wipe cycles (for example, 3-day cycle) you will need to use either the wipeUnixTimestampOverride or wipeCronOverride convars.

Changing the day of week - wipeDayofWeek <0-6>

Value Day of week Notes
0 Sunday
1 Monday
2 Tuesday
3 Wednesday
4 Thursday (default)
5 Friday
6 Saturday

Changing the wipe hour - wipeHourofDay <0-23>

Default: 19 - You can change this to specify the hour your server wipes. Time is specified in 24-hour format. If you type wipeHourofDay 14.5, then it'll be interpreted as 2:30 PM.

Changing the timezone - wipeTimezone

Default: GMT (ID=Europe/London, IANA=Europe/London) - You can change this to specify your server's timezone, see Supported Time Zones

Specifying an exact wipe date

Cronos

Internally it is now using cron expressions using the Cronos library. If you'd like, you can use a custom cron expression for your wipe timer by setting the wipeCronOverride convar. Cronos Parser

UnixTimeStampOverride

You can set an exact wipe date and time using a UNIX timestamp with this server convar: wipeUnixTimestampOverride <timestamp>. Keep in mind that this convar will override all other settings for the wipe timer. Epoch Converter

Server will ignore the override if specified timestamp is in the past already. If that's the case, it will revert to using your wipe schedule convars.

Examples

Here are a few examples to see how it works:

Wipe Frequency tag Config Explanation
Monthly +wipeDayofWeek 4 +wipeHourofDay 14.5 Server will wipe on every first Thursday of the month at 2:30 PM.
Monthly +wipeDayofWeek 1 +wipeHourofDay 9 Server will wipe on every first Monday of the month at 9 AM.
Weekly +wipeDayofWeek 4 +wipeHourofDay 18 Server will wipe every Thursday at 6 PM.
Biweekly +wipeDayofWeek 0 +wipeHourofDay 23 Server will wipe every other Sunday at 11 PM.
Biweekly +wipeDayofWeek 4 +wipeHourofDay 19 Server will wipe every other Thursday at 7 PM.
+wipeUnixTimestampOverride 1683622506 Server will wipe exactly on May 9th, 2023 at 08:55:06 (GMT+0)
+wipeUnixTimestampOverride 1686766934 Server will wipe exactly on June 14th, 2023 at 18:22:14 (GMT+0)
+wipeCronOverride "0 14 1-7,15-21 * 4" Server will wipe first, and third Thursday 2PM

PrintWipe

To check if you have set up the timer correctly, you can use the PrintWipe command.

Example Output

Frequency: Monthly Timezone: GMT (ID=Europe/London, IANA=Europe/London) Wipe day of week: Thursday Wipe hour: 19 Test time: 2023-06-01T20:56:53.2858450+00:00 Wipe time: 2023-07-06T19:00:00.0000000+01:00 Time until wipe: 34:21:03:06.714155 Ticks until wipe: 30133867141550 Cron: 0 19 * * 4#1 Next 10 occurrences: 0. 2023-07-06T19:00:00.0000000+01:00 1. 2023-08-03T19:00:00.0000000+01:00 2. 2023-09-07T19:00:00.0000000+01:00 3. 2023-10-05T19:00:00.0000000+01:00 4. 2023-11-02T19:00:00.0000000+00:00 5. 2023-12-07T19:00:00.0000000+00:00 6. 2024-01-04T19:00:00.0000000+00:00 7. 2024-02-01T19:00:00.0000000+00:00 8. 2024-03-07T19:00:00.0000000+00:00 9. 2024-04-04T19:00:00.0000000+01:00

Explained

This shows how your timer is currently setup.

  • Frequency is the Wipe Schedule setup in your server-browser-tags
  • Test Time (current time + daysToAddTest + hoursToAddTest convars. By default both convars are 0, so if you didn't change them, this line will display your current local time.
  • Wipe time (this will output an exact date of calculated wipe time)
  • Time until wipe: days:hours:minutes:seconds.
  • Ticks until wipe: returns remaining ticks until the wipe. Tick is the smallest unit of time that is equal to 100 nanoseconds.
  • Cron: The cron expression your server is using, and the next 10 dates that match it

Misc Convars

These convars do not seem to be relevant if you are not a developer. Might be removed/changed in the future. So far, they were used only for PrintWipe output info; Test time

daysToAddTest <value>

By default set to 0.

hoursToAddTest <value>

By default set to 0.

Code

Wipe timer code is available in WipeTimer.cs. You can access it through Rust Dedicated Server's Assembly-CSharp.dll.

If you don't know your server's time and timezone, you can add this to one of your oxide plugins. Look for one with OnServerInitialized() and add the two lines at the top. When you reload the plugin it will print the information in console and be in your oxide logfile too.

TimeZone curTimeZone = TimeZone.CurrentTimeZone; Puts($"time now: {DateTime.Now.ToString("h:mm:ss tt")} - timezone: {curTimeZone.StandardName}");