mpg123 and crontab

Joshua McKinney clug at
Fri Sep 20 03:10:48 EST 2002

I've been trying to get mpg123 working from my crontab to wake
me up.  I've tried running it straight from the crontab line
both with a file list (--list /dir/mp3s.txt) and from a shell
script called from the crontab.  I can't seem to get it working
or find any info on google that would indicate why it may not
work.  I have tried aplay in the crontab and it works fine as
does mpg321.  I've tried piping the output of mpg123 to a file,
both stdout and stderr, but don't get any indication as to why
it quit even with lotsa -v's (verbose). It just prints the id3
tag and license info etc and exits.  mpg123 definitely plays
fine from a shell.

Pertinent System info:
gentoo-1.3: ie everything compiled with gcc-2.95.3
vcron-3.0.1 (vixie cron)

As a side note, regarding the converstation several clug
meetings ago about the random bash parameter thing.  I had until
a few weeks ago just been using bash to generate a random number
and select the particular parameter from the command line of a
script.  This was so that I could play random oggs / mp3s from
another script.  Everything was all well and good until I
borrwed a friend's media collection, and now I have around 4000
mp3s lying around.  Bash has a bit of a cow at trying to pass a
command line of around 300k or so (guesstimate), os I need to
think of some other way to generate a random filename from a
large list of files.  Now I could write up a small C app to do
it, but that (as Mikal is often quoted as saying) would be the
easy option.

Anyhoo, probably should be sleeping (tis 3am)

Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former.
- Albert Einstein

More information about the linux mailing list