download.service (/etc/systemd/system/download.service
)
[Unit]
Description=Download packages
Wants=network-online.target
After=network-online.target
[Service]
User=root
Type=oneshot
ExecStart=/bin/pacman -Syuw --noconfirm
[Install]
WantedBy=multi-user.target
download.timer (/etc/systemd/system/download.timer
)
[Unit]
Description=Run download.service hourly and on boot
Requires=download.service
[Timer]
Unit=download.service
OnBootSec=10s
OnUnitActiveSec=1h
[Install]
WantedBy=timers.target
Reload daemons and enable/start the timer
systemctl daemon-reload
systemctl enable download.timer
systemctl start download.timer