> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.nexushosts.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Restart Your GMOD Server on a Schedule

Restarting your GMod server regularly is a good way to keep performance smooth, clear out memory buildup, and apply updates or changes. Instead of doing it manually every time, you can set up automatic restarts at specific times, like once a day during off-hours.

Nexus Hosting includes a built-in scheduler that makes this easy. 

### **Step 1: Log in** 
Log in to your [__Nexus Hosting Account__](https://gamecp.nexuscorehosting.com/auth/login).

![](https://storage.crisp.chat/users/helpdesk/website/-/1/e/6/c/1e6c49e0d02dca00/nexuscorelogin_qu9soz.png)
### **Step 2: Select the Server**
Once on the dashboard, find and select the intended Garry’s Mod server. 

![](https://storage.crisp.chat/users/helpdesk/website/-/1/e/6/c/1e6c49e0d02dca00/select-server-gm_1iv059d.png)
### **Step 3:** **Create a New Schedule**
Select the **Schedules** icon from the sidebar. You’ll see any scheduled events you’ve set up here. 

Click **Create schedule** to start a new one.

![](https://storage.crisp.chat/users/helpdesk/website/-/1/e/6/c/1e6c49e0d02dca00/schedules-gm_1embfnk.png)
### **Step 4: Configure Your Schedule**
Give your schedule a clear name (for example, “Automatic Server Restarts”).
Next, configure how often it should run using the Cron job syntax:

* A cron job consists of five fields (minute, hour, day of month, month, and day of week).
* For instance, 0 3 * * * means “run at 3:00 AM every day,” while */5 * * * * means “run every 5 minutes.”
* If you need help, toggle **SHOW CHEATSHEET&#32;**for examples. You can also read more about the Cron job scheduling format [__here__](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules). 

A good default is to run backups once a day during off-peak hours when the fewest players are online. For example, 4:00 AM (server time) is often a quiet period. The corresponding cron schedule would be 0 4 * * *.

![](https://storage.crisp.chat/users/helpdesk/website/-/1/e/6/c/1e6c49e0d02dca00/create-schedule-gm_1bky3gh.png)
When you’ve set your cron schedule and reviewed the toggles, click**&#32;Create schedule**.

### **Step 5:** **Add a Server Message Task to Run Before Restart (Optional But Recommended)**
Your new schedule now appears in the list. Select it, then click **New Task**.

| You can change the Cron job scheduling at any time by clicking Edit. 


![](https://storage.crisp.chat/users/helpdesk/website/-/1/e/6/c/1e6c49e0d02dca00/new-task-gm_ytuadv.png)
Select the **Send command** action. Then add a payload using the command say followed by a warning message to your players. Copy and paste the line multiple times if you want to spam the chat a bit, to ensure everyone sees the warning. 

![](https://storage.crisp.chat/users/helpdesk/website/-/1/e/6/c/1e6c49e0d02dca00/edit-task-2-gm_kanevn.png)
Click **Save Changes&#32;**when you are done.

You want to do this before you create the restart task, because the schedule runs the tasks in order. 

### **Step 6: Add the Restart Task**
Within the same schedule, click **New Task** again. From the **ACTION&#32;**dropdown, choose **Send Power Action**. Then select **Restart the server** from the Payload drop-down menu. 

If you want to give players a heads-up before the server restarts, you can add a time offset in seconds. For example, if the offset is set to 120 seconds, the server will wait two minutes after the previous task (the server message) before restarting. 

Click **Create Task** once you’re done.

![](https://storage.crisp.chat/users/helpdesk/website/-/1/e/6/c/1e6c49e0d02dca00/edit-task-gm_17s2gci.png)
### **Step 7: Confirm It’s Working**
All set! You can click **Run Now&#32;**to test the schedule. It should immediately broadcast the message and then restart the server after your chosen offset time. The next scheduled run time is displayed under the schedule name (verify this to make sure your cron job is set up right).

![](https://storage.crisp.chat/users/helpdesk/website/-/1/e/6/c/1e6c49e0d02dca00/run-now-gm_18m5u3e.png)



