Skip to content

Instantly share code, notes, and snippets.

@andreyuhai
Last active September 7, 2020 18:48
Show Gist options
  • Save andreyuhai/0452582769d7ea777938a26aa65228be to your computer and use it in GitHub Desktop.
Save andreyuhai/0452582769d7ea777938a26aa65228be to your computer and use it in GitHub Desktop.
How to play audio with a cron job

If you want to play audio with a cron job

Source

Get your user ID.

$ id -u <user_name>
1000

Then add the line below to crontab -e.

XDG_RUNTIME_DIR=/run/user/<user_id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment