Score:0

I can't run an audio with crontab

us flag

I wanted to create a "radio alarm clock" with an old notebook. The first step was to have it play audio at a specific time, so I created this script:

#!/bin/bash
echo "ideas for practice"
PATH=/home/rick/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
mpg123 -v /home/rick/Music/mala.mp3

And then added it to my crontab:
* * * * * ./musicCron.sh 2>> ~/cron.log

However, I always get the error:
./musicCron.sh: line 6: 9803 Segmentation fault (core dumped) mpg123 -v ~/Music/mala.mp3 i have try with ffplay too, so I think that the problem is not that.

Is there any reason why I can't execute mpg123 through crontab?

do you have other way to do that I want? I don`t need to do that with cron. There is another way?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.