# check-update

LinuxGSM comes with a game server `check-update` command. All [SteamCMD](https://docs.linuxgsm.com/steamcmd) games servers are supported, as well as some other servers such as Teamspeak, Minecraft, Mumble & Factorio.

## Commands

Standard: `./gameserver check-update`

Short: `./gameserver cu`

Unlike the [update](https://docs.linuxgsm.com/commands/update) command `check-update` will check for any available updates and take no action if no update is available. If there is an update it will send an alert.

## Automatic check for update

### Scheduled check for updates

A [cronjob](https://docs.linuxgsm.com/configuration/cronjobs) can be set to run `check-update` at any given time.

{% hint style="warning" %}
Ensure that an [alert](https://docs.linuxgsm.com/alerts) is configured so you are alerted to any updates
{% endhint %}

To edit cronjobs, type:

`crontab -e`

A cronjob can be run as the `gameserver user` or as `root`, this choice is down to personal preference. Remember to amend the examples to match a specific game server.

Here is an example of a user-based cronjob to check for an update once an hour.

```
0 * * * * /home/username/gameserver check-update > /dev/null 2>&1
```

Here is an example of a root-based cronjob to check for an update once an hour.

{% hint style="info" %}
The extra `su - username -c` indicates which user to run the script as.
{% endhint %}

```
0 * * * * su - username -c '/home/username/gameserver update' > /dev/null 2>&1
```

[crontab.guru](https://crontab.guru/) is a great resource to generate cronjobs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linuxgsm.com/commands/check-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
