¿Qué es el formato de archivo TIMER?
Un archivo .timer es una unidad de temporizador utilizada por systemd, el sistema de inicio y administrador de servicios detrás de la mayoría de las distribuciones de Linux. Programa cuándo se ejecuta otra unidad, generalmente un archivo .service coincidente, y actúa como un reemplazo moderno para cron. El archivo es texto plano UTF-8 pequeño en estilo INI, por lo que contiene una programación en lugar de código de programa.
Cada temporizador normalmente se empareja con un servicio del mismo nombre base. Un archivo llamado backup.timer activa backup.service a menos que su directiva Unit= nombre un objetivo diferente. La unidad se organiza en tres secciones: [Unit] para la descripción y dependencias, [Timer] para la programación, y [Install] para la habilitación a través de WantedBy=timers.target.
Las programaciones vienen en dos formas. Los temporizadores en tiempo real usan OnCalendar= para activarse en eventos del calendario, de la misma manera que lo hace una tarea de cron. Los temporizadores monotónicos como OnBootSec= o OnUnitActiveSec= se activan tras un lapso establecido después de un evento de referencia como el arranque o la última ejecución. Opciones como Persistent=true recuperan una ejecución perdida después de que la máquina estuvo apagada, y RandomizedDelaySec= distribuye la carga entre muchos hosts.
Seguridad y protección
RIESGO: LOWA .timer file is plain text with no executable code, so opening it in an editor is safe. The real consideration is trust: a timer can schedule any system command through its paired service, so only install units from sources you trust and review them before enabling with systemctl.
Detalles del formato
en pocas palabras- Construct 2/3 timer behavior data - Some game and animation tools store timer state, but this is not the dominant meaning of the extension.
- Generic application timer/config data - A few niche programs write settings files named with a .timer suffix; these are unrelated to systemd.
Programas que abren archivos TIMER
.timer file on a workstation before copying it to a Linux host; opens as plain text with optional systemd/INI highlighting. .timer unit as text before deploying it to a Linux server. vim /etc/systemd/system/name.timer; syntax highlighting for systemd units ships with Vim. nano /etc/systemd/system/name.timer; run systemctl daemon-reload afterward to apply changes. systemctl enable --now name.timer, inspect the schedule with systemctl list-timers, and check status with systemctl status name.timer. systemctl edit name.timer and validate its calendar expression using systemd-analyze calendar "OnCalendar-string". .timer file as a plain-text unit; the systemd/INI extensions add highlighting and directive hints. Detalles técnicos
especificación profunda| Encoding | UTF-8 plain text |
| Byte order | Not applicable (text) |
| Container | None; INI-style key=value sections |
| Typical size | Under 1 KB |
| Structure | Three sections: [Unit] for description and dependencies, [Timer] for the schedule (OnCalendar, OnBootSec, OnActiveSec, OnUnitActiveSec, OnStartupSec, OnUnitInactiveSec, AccuracySec, RandomizedDelaySec, Persistent, Unit), and [Install] for enablement via WantedBy=timers.target. |
| Integrity | None built in |
| Platforms | Linux |
| Notes | Each .timer file normally pairs with a same-named .service file (foo.timer triggers foo.service unless Unit= overrides). Timers come in realtime (calendar) and monotonic (relative to boot, activation, or last run) forms and serve as a cron alternative managed through systemctl and logged to the systemd journal. |
| File Locations | System units in /usr/lib/systemd/system/ (packaged) and /etc/systemd/system/ (admin overrides); user units in ~/.config/systemd/user/ and /etc/systemd/user/. |
| Line Endings | Unix LF |
| Lanzado | 2012 (systemd timer units) |
| Estándar abierto | Sí · libre de regalías |
| Especificación | man7.org |
Conversiones de TIMER
Preguntas y respuestas de la comunidad
preguntado por usuariosAún no hay preguntas; sea el primero en preguntar sobre los archivos TIMER.
Preguntas frecuentes
¿Cómo abro un archivo .timer?
nano, vim, VS Code o Notepad++. Es un archivo de texto plano pequeño, por lo que no se requiere software especial para leerlo.¿Cuál es la diferencia entre un archivo .timer y un archivo .service?
.service define qué ejecutar; un archivo .timer define cuándo ejecutarlo. Un temporizador llamado backup.timer activa backup.service a menos que su directiva Unit= indique lo contrario.¿Cómo habilito e inicio un temporizador?
/etc/systemd/system/, ejecute systemctl daemon-reload, luego systemctl enable --now name.timer. Verifíquelo con systemctl list-timers.¿Son los temporizadores de systemd mejores que cron?
Persistent=true. Cron es más simple y más portátil entre sistemas Unix. Ambos son válidos; los temporizadores son comunes en el Linux moderno.¿Por qué no se activa mi temporizador?
systemctl status name.timer, que exista un servicio coincidente y que la expresión OnCalendar= sea válida. Pruebe la expresión con systemd-analyze calendar "su-cadena".