# The Scheduler

The Scheduler is our maintenance bot for etke.cc customers. It lets you run and schedule the routine upkeep your server needs (maintenance, disk checks, service restarts, and more) straight from a Matrix chat.

## Getting Started

Initiating and using The Scheduler is straightforward. Simply initiate a chat with [@scheduler:etke.cc](https://matrix.to/#/@scheduler:etke.cc) and send the command `help` to access detailed instructions.

> **Note**: The Scheduler bot exclusively serves etke.cc customers, making it an invaluable resource for your server management needs.

## Features

The Scheduler supports four distinct work modes, each designed to cater to specific tasks and needs.

You can use all the modes together, but the one we really recommend setting up is recurring maintenance, so your server stays up to date and protected without you having to think about it.

### Run

The `run` mode immediately executes a [command](#commands), providing rapid results. For instance:

- @customer: run ping
- @scheduler: Command execution initiated. Please be patient, as this may take some time. You’ll receive a notification upon completion.
- @scheduler: Execution of `run ping` command **successful**

```
INFO [etke.cc] disk usage: 85%
```

- 🟩 CPU utilization is ~**7%**
- 🟥 Disk utilization is ~85%: recommended is below 80% ([help](https://etke.cc/services/monitoring/#high-disk-usage))
- 🟩 RAM utilization is ~**77%**
- 🟥 25 (tcp port): timeout ([help](https://etke.cc/services/monitoring/#ports-failures))
- 🟥 587 (tcp port): timeout ([help](https://etke.cc/services/monitoring/#ports-failures))
- 🟥 [etke.cc federation](https://federationtester.matrix.org/#etke.cc): invalid character ‘&lt;’ looking for beginning of value ([help](https://etke.cc/services/monitoring/#well-knownmatrixserver-failures))
- 🟩 [https://matrix.etke.cc/\_matrix/client/versions](https://matrix.etke.cc/_matrix/client/versions)
- 🟩 [https://matrix.etke.cc:8448/\_matrix/federation/v1/version](https://matrix.etke.cc:8448/_matrix/federation/v1/version)
- 🟥 social.etke.cc (DNS record): no or invalid A record; invalid CNAME record (expected: 1.2.3.4, actual: 4.3.2.1, 5.6.7.8) ([help](https://etke.cc/services/monitoring/#dns-records-failures))

Explore the [full list of available commands here](#commands).

Alternatively, you can use [Ketesa](https://etke.cc/help/extras/ketesa/#server-actions) to run the commands.

### Schedule

The `schedule` mode allows you to plan a command for a specific date and time (UTC).

For example, scheduling maintenance for July 1st at 5 pm UTC:

- @customer: schedule maintenance 2022-07-01 17:00
- @scheduler: Command scheduled.

On July 1st, around 5:30 pm UTC (accounting for the duration of maintenance), you will receive the following message:

- @scheduler: Execution of `run maintenance` command **successful**
- @scheduler: Identified issues:
- 🟥 [https://etke.cc/.well-known/matrix/server](https://etke.cc/.well-known/matrix/server) ([help](https://etke.cc/services/monitoring/#well-knownmatrixserver-failures))

The `schedule` mode essentially schedules the `run` mode for a specified future date and time.

### Recurring

The `recurring` mode configures specific **weekdays** and times for recurring `schedule` mode commands.

By default, automatic maintenance is scheduled to a random weekday and time. This mode simplifies recurring tasks, automatically creating corresponding schedules for executing the chosen command at specific times on specified weekdays.

For example, setting up server maintenance every Friday at 3 pm UTC:

- @customer: recurring maintenance Friday 15:00
- @scheduler: Recurring schedule configured.

Every Friday, around 3:30 pm UTC (considering maintenance duration), you will receive this message:

- @scheduler: Execution of `run maintenance` command **successful**

> **Note**: You can set only one recurring schedule per command (e.g., one `recurring maintenance`). Multiple recurring configurations for the same command will replace one another, leaving you with a single recurring configuration (the last one), for example, on Monday at 5 pm UTC.

### List

The `list` mode serves as a useful tool for reviewing your executed commands, scheduled tasks, and recurring schedules.

It is especially handy when you need to check specific information. Here are some examples:

- @customer: list runs
- @scheduler:

```
* 2022-06-12 16:36: run ping
* 2022-05-30 22:01: run maintenance
* 2022-06-19 16:03: run restart slack failed: exit status 1
```

- @customer: list schedules
- @scheduler:

```
* 2022-06-27 16:00: run ping (recurring)
* 2022-07-01 17:00: run ping
```

> **Note**: The `(recurring)` suffix indicates that the task is automatically scheduled because it is part of a (weekly) `recurring` schedule. It shows the nearest future recurrence date.

- @customer: list recurring
- @scheduler:

```
* Monday 16:00: run ping
```

### Alert

In addition to its server management capabilities, The Scheduler proactively sends alerts when issues arise with your server. These alerts can include notifications about high disk usage or unreachable API endpoints on your Matrix server.

More details about the monitoring system is available on the [Monitoring](https://etke.cc/services/monitoring/) page.

Please note that The Scheduler will automatically initiate a chat with you if you don’t already have one set up.

## Commands

**Command List**

The Scheduler provides several essential commands to address various server management needs:

### ping

The `ping` command checks server reachability and disk utilization. It’s especially useful when configuring a new firewall or ensuring you have sufficient storage for those important cat photos.

Example:

- @customer: run ping
- @scheduler: Command execution initiated. Please be patient; you will receive a notification upon completion.
- @scheduler: Execution of `run ping` command **successful**

```
INFO [etke.cc] disk usage: 85%
```

- 🟩 CPU utilization is ~**7%**
- 🟥 Disk utilization is ~85%: recommended is below 80% ([help](https://etke.cc/services/monitoring/#high-disk-usage))
- 🟩 RAM utilization is ~**77%**
- 🟥 25 (tcp port): timeout ([help](https://etke.cc/services/monitoring/#ports-failures))
- 🟥 587 (tcp port): timeout ([help](https://etke.cc/services/monitoring/#ports-failures))
- 🟥 \[etke.cc federation]: invalid character ‘&lt;’ looking for beginning of value ([help](https://etke.cc/services/monitoring/#well-knownmatrixserver-failures))
- 🟩 [https://matrix.etke.cc/\_matrix/client/versions](https://matrix.etke.cc/_matrix/client/versions)
- 🟩 [https://matrix.etke.cc:8448/\_matrix/federation/v1/version](https://matrix.etke.cc:8448/_matrix/federation/v1/version)
- 🟥 social.etke.cc (DNS record): no or invalid A record; invalid CNAME record (expected: 1.2.3.4, actual: 4.3.2.1, 5.6.7.8) ([help](https://etke.cc/services/monitoring/#dns-records-failures))

More details about the monitoring system and checked parameters is available on the [Monitoring](https://etke.cc/services/monitoring/) page.

### disk

The `disk` command assesses disk utilization for common server components, providing valuable insights when disk usage is a concern.

Example:

- @customer: run disk
- @scheduler: Command execution initiated. Please be patient; you will receive a notification upon completion.
- @scheduler: Execution of `run disk` command **successful**

```
INFO [etke.cc] disk usage: 65%
INFO [etke.cc] Database: 5.9G
INFO [etke.cc] Database backups: 8.6G
INFO [etke.cc] Media: 3.8G
```

### price

The `price` command provides an overview of your server’s cost with detailed breakdown by components.

[Contact us](https://etke.cc/contacts/) if you want to request changes to your server configuration or additional services based on this information.

Example:

- @customer: run price
- @scheduler: Command execution initiated. Please be patient; you will receive a notification upon completion.
- @scheduler: Execution of `run price` command **successful**

The total price for your server is **€65**.

Here is the detailed breakdown (free items are skipped):

- [**BorgBackup**](https://etke.cc/help/extras/borgbackup): `€3` *The "Holy Grail" of backups (requires a separate Borg backup provider)*
- [**Matrix**](https://etke.cc/help/faq#what-are-the-base-matrix-components-installed-on-the-server): `€5` *Base components and services for any server*
- [**Email service**](https://etke.cc/help/extras/email-hosting): `€5` *A fully-featured multi-user email service for your domain ([you@domain.com](mailto:you@domain.com)), powered by Migadu. SMTP Relay is included at no extra cost.*
- [**Hosting (Big)**](https://etke.cc/services/hosting/): `€25` *The VPS where your Matrix server is hosted*
- [**GoToSocial**](https://etke.cc/help/extras/gotosocial): `€3` *A fast, fun, ActivityPub server*
- [**Buscarron**](https://etke.cc/help/bots/buscarron): `€3` *A bot that receives web form submissions (HTML/HTTP POST) and sends them to (encrypted) Matrix rooms*
- [**Honoroit**](https://etke.cc/help/bots/honoroit): `€3` *A helpdesk bot with end-to-end encryption support*
- [**Bridges**](https://etke.cc/help/bridges/): `€5` *With the help of bridges, you can access different networks right from your own Matrix server*
- [**Synapse Single Sign-On**](https://etke.cc/help/extras/synapse-sso): `€5` *Log in to Matrix with an OpenID provider as a backend (Auth0, Google, Github, Gitlab, Okta, etc.)*
- [**Synapse Workers**](https://etke.cc/help/extras/synapse-workers): `€5` *A multi-process homeserver setup to more efficiently handle many users and large rooms. Requires a powerful server (8+ GB of RAM)*
- [**Miniflux**](https://etke.cc/help/extras/miniflux): `€1` *A minimalist and opinionated feed reader*
- [**ntfy**](https://etke.cc/help/extras/ntfy): `€1` *Keep your push notifications private with your self-hosted instance*
- [**Radicale**](https://etke.cc/help/extras/radicale): `€1` *Free and Open-Source CalDAV and CardDAV Server*

### payments

The `payments` command provides a list of the last 10 payments made for your server, including the date, amount, and payment type. This command is particularly useful for tracking your server’s payment history and ensuring that everything is up to date.

Example:

- @customer: run payments
- @scheduler: Command execution initiated. Please be patient; you will receive a notification upon completion.
- @scheduler: Execution of `run payments` command **successful**

Here are the last 10 payments for your server:

- **Jun 17, 2025**: €28 (subscription)
- **May 17, 2025**: €28 (subscription)
- **Apr 17, 2025**: €28 (subscription)
- **Mar 17, 2025**: €28 (subscription)
- **Feb 18, 2025**: €3
- **Feb 17, 2025**: €25 (subscription)
- **Jan 17, 2025**: €25 (subscription)
- **Dec 17, 2024**: €25 (subscription)
- **Nov 17, 2024**: €25 (subscription)
- **Oct 17, 2024**: €25 (subscription)

If you want to see more details, please use your [Ketesa](https://etke.cc/help/extras/ketesa/) panel.

### maintenance

This command triggers the [maintenance](https://etke.cc/services/#maintenance) process, which typically takes 15-30 minutes to complete. You can find further details on the [services](https://etke.cc/services) page.

Example:

- @customer: run maintenance
- @scheduler: Command execution initiated. Please be patient; you will receive a notification upon completion.
- @scheduler: Execution of `run maintenance` command **successful**

You may find the latest changes in the [#updates:etke.cc](https://matrixrooms.info/room/updates:etke.cc) room.

### restart

The `restart` command serves to restart a systemd service, particularly helpful when a bridge is unresponsive. It features an internal mapping between “user-friendly” service names and actual service names. For instance, if you wish to restart the Facebook bridge, you can use `run restart facebook` instead of specifying `run restart matrix-mautrix-facebook` (although the latter is equally valid).

Example:

- @customer: run restart slack
- @scheduler: Command execution initiated. Please be patient; you will receive a notification upon completion.
- @scheduler: Execution of `run restart slack` command **successful**

**Note**: In the [`schedule`](#schedule) and [`recurring`](#recurring) modes, the `restart` command must be placed after the date/weekday and time. For example, you can use `schedule restart 2022-07-01 17:00 slack` or `recurring restart Monday 17:00 slack`.

### reboot

The `reboot` command is used to reboot the server. It is particularly useful when a server is unresponsive or when you need to apply updates that require a reboot. **WARNING**: This command will cause a downtime, so use it with caution.

Example:

- @customer: run reboot
- @scheduler: Command execution initiated. Please be patient; you will receive a notification upon completion.
- @scheduler: Execution of `run reboot` command **successful**

That’s the full command set. Mix the modes and commands however suits your server, and if you want changes or have questions, just [get in touch](https://etke.cc/contacts).




---
* [llms.txt](https://etke.cc/llms.txt): full site index in markdown
