move cron/ to containers/cron/

This commit is contained in:
Eduardo Silva
2026-01-07 11:09:30 -03:00
parent 41fbf442f2
commit f14b926a47
4 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
FROM ubuntu:latest
# Instalar cron
RUN apt-get update && apt-get install -y cron curl
# Adicionar seus scripts de cron
COPY cron_tasks /etc/cron.d/cron_tasks
# Dar permissões apropriadas
RUN chmod 0644 /etc/cron.d/cron_tasks
# Criar um arquivo de log para armazenar os resultados do cron
RUN touch /var/log/cron.log
# Executar o cron em primeiro plano
CMD cron -f

View File

@@ -0,0 +1,3 @@
* * * * * root /usr/bin/curl -s http://wireguard-webadmin:8000/api/cron_check_updates/ >> /var/log/cron.log 2>&1
*/10 * * * * root /usr/bin/curl -s http://wireguard-webadmin:8000/api/cron_update_peer_latest_handshake/ >> /var/log/cron.log 2>&1
* * * * * root /usr/bin/curl -s http://wireguard-webadmin:8000/api/cron_refresh_wireguard_status_cache/ >> /var/log/cron.log 2>&1