sudo tee /etc/systemd/system/crash-test.service <<EOF
[Unit]
Description=Crash system after 1 minute
[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo c | tee /proc/sysrq-trigger"
EOF
sudo tee /etc/systemd/system/crash-test.timer <<EOF
[Unit]
Description=Timer for crashing system 1 minute after boot
[Timer]
OnBootSec=3min
AccuracySec=1us
[Install]
WantedBy=timers.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now crash-test.timer