Play sound from crontab

2024-07-19 linux raspi

To play sounds from crontab jobs. Needed to add XDG_RUNTIME_DIR like the below. (I am using RaspberryPiOS, not sure about other environment)

XDG_RUNTIME_DIR="/run/user/1000"
@reboot sleep 10 && aplay foo.wav