0

I downloaded a music file named bell.mp3 and stored it in my /home/username/Downloads

I was able to play it using mplayer

sudo apt-get install mplayer

mplayer /home/username/Downloads/bell.mp3

However, I want to play it every minute but it didn't work.

*/1 * * * * mplayer /home/username/Downloads/bell.mp3

Is my syntax incorrect? What should I do?

2
  • 2
    What do the logs say? Oct 2, 2020 at 0:05
  • I believe your syntax is correct. Have you tried restarting the cron service? Some times the change does not pick up until the service is restarted or reloaded. Also if your path has any spaces make sure to quote or escape.
    – mecj5
    Oct 2, 2020 at 0:29

1 Answer 1

0

I don't know if it's an mplayer thing but I do something similar with mpg123.

This is my user crontab (not /etc/crontab, just normal user):

0 6-22 * * * /usr/bin/mpg123 /home/me/sounds/magpies.mp3 > /dev/null 2>&1

Check that the user is also member of the groups audio and video

1
  • Check that the user is also member of the groups audio and video This is not valid for systems using PulseAudio. Oct 2, 2020 at 9:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .