I know there are aready many questions about this topic, but no answer could solve my problem.
I use a Raspberry Pi B+ with the operating System Raspbian Jessie. The Raspberry is said to synchronize with an intern NTP server for the correct time. Further the Raspberry Pi shall play an audio file at a concrete time.
The command for the audio is saved in a script.
@reboot sudo ntpdate -s 10.0.5.3
@hourly sudo ntpdate -s 10.0.5.3
00 9 * * * /home/pi/script.sh
20 9 * * * /home/pi/script.sh
00 12 * * * /home/pi/script.sh
40 12 * * * /home/pi/script.sh
00 16 * * * /home/pi/script.sh
The log shows following:
Jan 29 10:00:01 PiName CRON: (root) CMD (sudo ntpdate -s 10.0.5.3)
Jan 29 10:17:01 PiName CRON: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 29 11:00:01 PiName CRON: (root) CMD (sudo ntpdate -s 10.0.5.3)
Jan 29 11:17:02 PiName CRON: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 29 12:00:01 PiName CRON: (root) CMD (sudo ntpdate -s 10.0.5.3)
Jan 29 12:00:01 PiName CRON: (root) CMD (omxplayer audio.wav)
Jan 29 12:00:03 PiName CRON: (CRON) info (No MTA installed, discarding output)
The problem is that there is no sound played, if the time is reached. On another Raspberry Pi B with Raspbian wheezy, it works successful.
Thank you very much for every answer.