systemd services, scheduled tasks and logs on a VPS, natural language requests

Published on 2026-08-25 by frfrand

How to create systemd services, schedule tasks with timers, and read their logs on a VPS by asking an AI using ArduMaker's MCP, tool by tool.

systemd services, scheduled tasks and logs on a VPS, natural language requests

Short answer: with ArduMaker's MCP you can ask an AI to create, edit, restart, or delete systemd services, schedule recurring tasks with systemd timers, and read their logs, all inside your VPS. If the process is part of an app deployed from git, it goes in that app's deploy configuration, not in a standalone service.

Writing a systemd unit file by hand is one of those things you do three times a year and always end up looking up the syntax. The same goes for timers: nobody remembers by heart how to express "every Tuesday at 4 in the morning."

With ArduMaker's MCP, that is described in a sentence and the AI creates the file. This article walks through the services, scheduled tasks, and logs tools, with an everyday use case for each one.

Unlike domains and ports, which are resolved on the parent host, everything in this guide happens inside your VPS: the services, timers, and logs belong to your machine and you manage them entirely. As in the rest of the cloud area, each call carries company_id in addition to vps_id — ver_contexto_inicial returns both at once.

Tools covered: listar_servicios_vps, crear_servicio_vps, ver_servicio_vps, editar_servicio_vps, controlar_servicio_vps, eliminar_servicio_vps, ver_logs_systemd_vps, listar_tareas_vps, crear_tarea_vps, ver_tarea_vps, editar_tarea_vps, controlar_tarea_vps, eliminar_tarea_vps and ver_logs_tarea_vps.

Services that must always be up

listar_servicios_vps — "What services are running on this machine?" Shows the systemd services configured inside the VPS. Typical use: you inherited a server from another provider and need to understand what is running before touching anything.

crear_servicio_vps — "Set up my Node bot as a service, so it starts on its own" Creates a service from the raw unit file content (service_name and content), and always starts it and enables it at boot: if either of those two things fails, nothing is left halfway. The AI creates the file with the correct ExecStart, WorkingDirectory, and Restart=always. It is exactly the same power you have from the panel: the unit file content is not validated beyond what systemd validates, so ask it to show it to you before applying it. Typical use: moving a process that currently runs in a forgotten screen to something that survives a reboot.

An important exception: if the process is part of an app deployed from a git repo (the website, a worker), it is not created with this tool. It is declared in the app's deploy configuration (guardar_config_deploy_app), and the platform rewrites and restarts that unit on every deploy. A manually created service for that app would fall out of sync with the code.

ver_servicio_vps — "Show me how it was configured" Returns the full unit file and live status. Typical use: verify that the environment variable you added yesterday is actually in the file.

editar_servicio_vps — "Add the API key environment variable" Overwrites the unit file: full replacement, not a patch. Read before writing. Typical use: changed an application port, or need to add a parameter to the startup command.

controlar_servicio_vps — "Restart the worker" Executes start, stop, restart, enable or disable. Two clarifications that are often confused:

  • enable and disable only change whether the service starts at boot. They do not turn it on or off now. If you want both, they are two separate calls.
  • There is no list of protected services here. Unlike deletion, this tool can stop or disable critical services like nginx, docker or ssh. It is the most repeated task of all, and also the only one in this section where a misinterpreted phrase shuts down something important. Ask the AI to tell you what it will touch before touching it.

eliminar_servicio_vps — "Delete the old service from the project we closed" Stops it, disables it and removes the unit file. Here there is a safety net: a set of critical services is protected —ssh, nginx, docker, mysql and others— and the tool refuses to delete them. Typical use: cleanup when offboarding a client.

ver_logs_systemd_vps — "Why did the worker die?" Reads the journalctl of the service. Typical use: the exact moment something went down and you need the real error, not a guess.

Tasks that run on their own

listar_tareas_vps — "What scheduled tasks are there?" Shows the systemd timers configured on the machine. Typical use: finding out why the server has a load spike every day at the same time.

crear_tarea_vps — "Schedule a database backup every day at 3 AM" Creates the task with its task_name, its command and its schedule, with the option to run it once immediately in addition to scheduling it. The command goes on a single line and runs as root, without a working directory: it's best to use absolute paths or start with cd /path && .... Just like with services, the scheduled job of a git app goes in its deploy configuration (a timer type process), not here.

The schedule uses systemd OnCalendar syntax, not cron and not "3 AM". The three formats you will use:

  • --* 03:00:00 — every day at 3.
  • Tue --* 04:00:00 — Tuesdays at 4.
  • Shortcuts: daily, hourly, weekly.

In practice you don't need to memorize it: you describe the schedule in Spanish and the AI translates it. But if you are going to review what was configured, that is the syntax you will see.

Typical use: backups, temporary file cleanup, nightly synchronizations, report sending.

ver_tarea_vps — "When does it run and when did it last run?" Full details: service and timer content, status, next execution and last one. Typical use: confirm that last night's backup actually ran before touching production.

editar_tarea_vps — "Move it to 5 AM, at 3 it clashes with something else" Changes the command, the schedule, or both — at least one is required. An implementation detail worth knowing because it shows: internally it deletes the task and recreates it. If it was enabled, it stays enabled. But it's a recreation, not an in-place adjustment, so the next execution is recalculated from scratch. Typical use: reordering the night window when two heavy processes overlap.

controlar_tarea_vps — "Run the backup now, don't wait until night" Four actions: start runs the command once, right now; stop interrupts that execution; enable and disable turn automatic scheduling on and off. There is no restart here, unlike services. Typical use: you want a backup before a migration, without waiting for the scheduled time.

eliminar_tarea_vps — "Remove the task from the report we no longer send" Deletes the task. And an honest warning: here there is no list of protected names as there is for services. Whatever you ask to delete, gets deleted. Typical use: cleaning up inherited automations that keep running without anyone reading their output — it's worth listing and confirming first.

ver_logs_tarea_vps — "Did last night's backup finish successfully?" Task logs, with two views: service (the command's own output) or timer (the timer that triggers it). The first is almost always what you want; the second is useful when the suspicion is that the task didn't even fire. Typical use: the check everyone should do and almost no one does, now just one question away.

TÚ: El bot de Telegram se cayó otra vez durante la noche.

IA: ver_logs_systemd_vps(company_id = 3, vps_id = 7, service_name = "bot-telegram") -> "FATAL: connection refused (postgres)" a las 03:07

listar_tareas_vps(company_id = 3, vps_id = 7) -> backup-postgres, OnCalendar --* 03:00:00

"El bot murió a las 03:07 porque no pudo conectar con postgres. A las 03:00 corre el backup, que bloquea la base unos minutos. El bot no reintenta, por eso queda caído hasta la mañana."

TÚ: Que reintente solo, y mové el backup a las 4.

IA: ver_servicio_vps(company_id = 3, vps_id = 7, service_name = "bot-telegram") -> [unit file actual]

editar_servicio_vps(company_id = 3, vps_id = 7, service_name = "bot-telegram", content = "...Restart=always RestartSec=30...") -> el archivo entero, con el cambio aplicado sobre el contenido que acabo de leer

controlar_servicio_vps(company_id = 3, vps_id = 7, service_name = "bot-telegram", action = "restart")

editar_tarea_vps(company_id = 3, vps_id = 7, task_name = "backup-postgres", schedule = "--* 04:00:00")

"Hecho. Ahora el bot se levanta solo a los 30 segundos y el backup ya no le pisa el horario.

Aclaración sobre la tarea: editarla la borra y la vuelve a crear por dentro, así que quedó habilitada pero con la próxima ejecución recalculada. Si querés, la corro una vez ahora para confirmar que el comando sigue bien."

Frequently Asked Questions

Do I have to write the unit file myself? No. You describe what needs to run, from which folder and with which variables, and the AI creates the file. Ask it to show it to you before applying it: the content is not validated beyond what systemd validates, so that is the time to review it.

Do scheduled tasks use cron? No: they are implemented with systemd timers, which serve the same purpose, integrate with the rest of the machine and have their own logs. The schedule is written in OnCalendar syntax (--* 03:00:00), not cron syntax.

Where do the processes of an app I deploy from GitHub go? In its deploy configuration (ver_config_deploy_app and guardar_config_deploy_app): that is where its services, timers and variables are declared, and the platform rewrites them on each deploy. crear_servicio_vps and crear_tarea_vps are for what does not belong to an app.

Can I run a task outside of its schedule? Yes, with controlar_tarea_vps and the start action. This is usual before a migration or to test that the command works.

Can the AI accidentally shut down nginx or docker? Deleting them, no: eliminar_servicio_vps has a list of protected critical services. But stopping or disabling them, yes: controlar_servicio_vps does not have that protection. This is the most important asymmetry in this guide and it is worth keeping in mind when asking for a "stop everything".

Are tasks protected the same way? No. For tasks there is no list of protected names: whatever you ask to delete, gets deleted. List them before deleting.

Why do logs come "marked"? Because anyone can write a log: an application, a process, an attacker testing things against your server. The three log tools return their content wrapped and labeled as untrusted, with the instruction to treat it as data and never as instructions. If text in the form of an order directed at the AI appears in a log, the AI must report it to you, not obey it.

How do I connect the MCP? By adding https://mcp.ardumaker.com/mcp in a compatible client and authorizing it with your account.


Part of the series of guides on ArduMaker's MCP tools.

  • systemd
  • cron
  • tareas programadas
  • logs
  • MCP
  • ArduMaker
  • VPS
  • automatizacion

Keep reading

All articles · VPS plans