I wrote a scrpit that plays a song (an MP3)
Code:
#!/bin/bash
/usr/bin/mpg123 /home/robert/wakeup.mp3
very simple script, almost pointless to have the script but it's there and it works
i made a cron job to run this script at 8 am every day:
Code:
0 8 * * * robert /home/robert/alarm > /dev/null 2>&1
i ran the /home/robert/alarm > /dev/null 2>&1 and it plays the song and
doesnt output all the extra text that comes with runnign mpg123.
now, i decided to make a cron job to run this every 5 minutes so i could test it
out now (to see if it works).
Code:
*/5 * * * * ....(same as above)
i get this in my syslog ( /var/log/messages)
Code:
Oct 31 00:30:00 decatur CRON[5523]: (robert) CMD (/home/robert/alarm > /dev/null 2>&1)
Oct 31 00:30:00 decatur CRON[5524]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Oct 31 00:35:00 decatur CRON[5542]: (robert) CMD (/home/robert/alarm > /dev/null 2>&1)
Oct 31 00:40:00 decatur CRON[5550]: (robert) CMD (/home/robert/alarm > /dev/null 2>&1)
but i hear no music. it works fine in the console but nada when cron plays it.
The goal is to use my computer as my alarm clock
im using Vixie cron in Gentoo (vcron).