crontab-dnsistemas

This commit is contained in:
enrique.lara 2026-08-19 22:20:27 +00:00
commit 3c37ae1e5f

35
crontab-pbx-dnsistemas Normal file
View file

@ -0,0 +1,35 @@
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# Apagar SSH y HTTPD: Lunes a Viernes a las 22:00
0 22 * * 1-5 root /usr/bin/systemctl stop sshd httpd
# Encender SSH y HTTPD: Lunes a Viernes a las 06:00
0 6 * * 1-5 root /usr/bin/systemctl start sshd httpd
# APAGADO ASTERISK LUNES A VIERNES: 22:00 (10:00 PM)
0 22 * * 1-5 root /usr/bin/systemctl stop asterisk
# ENCENDIDO ASTERISK: Lunes a Sábado a las 06:00
0 6 * * 1-6 root /usr/bin/systemctl start asterisk
# APAGADO ASTERISK SÁBADOS: 18:00 (6:00 PM)
0 18 * * 6 root /usr/bin/systemctl stop asterisk
# Actualizaciones de Seguridad (Domingos a las 2:00 AM)
0 2 * * 0 root dnf update --security -y
# Forzar rotación de logs diariamente a las 03:00 AM
0 3 * * * root /usr/sbin/logrotate /etc/logrotate.conf