I know it is simple to do, but care to share the unit file?
cat /etc/systemd/system/upgrade-system.service
[Unit]
After=network-online.target
[Service]
ExecStart=/bin/bash -c '/usr/bin/snap refresh && apt update && apt upgrade -y'
[Install]
WantedBy=default.target