Scripts that back up the PostgreSQL database in the exact period.
[Unit]
Description=Run Python Script Every Month
[Service]
Type=oneshot
User=root
ExecStart=/usr/bin/python3 /home/pahtto/backup_postgres/main.py
[Unit]
Description=Run Python Script Every Month
Wants=pg_backup.service
[Timer]
OnCalendar=monthly
Persistent=true
[Install]
WantedBy=timers.target
sudo systemctl enable pg_backup.timer
sudo systemctl start pg_backup.timer
sudo systemctl status pg_backup.timer
systemctl list-timers --all # to check if the timer runs
sudo systemctl daemon-reload