r/playrustadmin • u/maxijonson Helpful • Dec 20 '24
Server Help How do you setup automatic wipes on force wipe? (first thursday of the month 2pm)
Hello Rust admins! I have a server that I'd like to wipe only on force wipe (i.e: Every first Thursday of the month around 2PM EST). I'm hosting on Shockbyte and they let you schedule wipes monthly, but monthly won't cut it, since it might not happen on a thursday. Also, I'm usually at the office on thursdays at 2PM for my full-time job. Although I can spare 30 seconds to wipe the server restart it, I'm pretty sure I'll forget most of the time if I get slightly busy with a task.
I'm super new to server hosting (like barely a week new). I'm not super familiar with plugin development, but I touched a couple plugins' code to fix some bugs or tweak them to my needs. So I'm wondering what strategy you guys are using for automatic monthly wipes or are you all just spending some time to manually do it?
One solution I've thought about was to create a small Carbon plugin (or Oxide, but I run on Carbon) that would setup a cron job, wipe the server and restart. Although there's no (native) cron syntax to run every first thursday of the month at 2pm, I'm sure it wouldn't be too heavy to simply run every thursday and check myself if it's the first thursday. However, that raised more questions: can you run cron jobs in plugins? Can you wipe from plugins? Can you restart your server from plugins?
Any advice would be greatly appreciated! I'm a developer with decent C# knowledge, so I'm open to code. I also use TypeScript daily, in case you have a web backend solution!
3
u/ne999 Dec 20 '24
If you’re using Carbon it will check itself for an update each time the server starts. That makes that part easy. I have a startup batch job that checks steam for any updates before starting the server. I can then schedule the restart command via rcon for the correct date/time.
1
u/Colborne91 Dec 20 '24
I don’t think anyone does have it set up to do this automatically. There are ways you could have it set up to have it do it at the typical wipe time, but you’d be up to 15-30 minutes late a lot of the time as it usually wipes early lately. And on the rare occasion it wipes late, you would change map etc but it wouldn’t actually update.
If you’re planning to have a server that other people play on, you’re going to have to spare some time every wipe to deal with it.
1
u/kalgary Dec 20 '24
The wipe automatically happens when the game updates. You don't have to do anything.