Author Topic: Automatically execute console command at specific system time (on a schedule)  (Read 1730 times)

0 Members and 1 Guest are viewing this topic.

Offline Chiller252

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 3
  • On a Journey to Combine Technology and Design
    • Personal Website
I've looked into Auto-Shutdown/ restart solutions in the past when it comes to SteamCMD servers, but haven't found anything that works and is scalable. At the moment, I just set my windows machine to restart in the middle of the night, automatically sign in, and execute the ServerDoc Start All .exe. If you haven't figured it out yet, I host locally on a semi-dedicated windows machine.

Does anyone know a command or script that will run a command through the console when the computer/system time hits a specific time? EX: at 4:00 AM the console executes the command 'sv_shutdown 1' OR at 12:00AM January 1st of any year the server executes the command: 'ulx csay HAPPY NEW YEAR'

I imagine there are many other uses/solutions that this mechanic could be very useful for. I just don't have enough know-how when it comes to things like console commands or the lua language to do much about it. That's why I'm here to see if anyone with that know-how is willing to share their insight on the subject of automatically executing console commands based on system time (or similar).

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Google a program called ServerChecker. It's a great program I've used for years to run my servers. It checks process IDs to make sure the server isn't crashed and I believe you can schedule regular restarts through that program as well.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given