Sponsored Content
Full Discussion: crontab+mplayer alarm clock
Top Forums Shell Programming and Scripting crontab+mplayer alarm clock Post 302682153 by hbar on Sunday 5th of August 2012 04:29:12 PM
Old 08-05-2012
crontab+mplayer alarm clock

I'm trying to run a alarm.sh using crontab, which play a song as
an alarm at 6.15 am. I'm using amixer so that volume increases by 10% in every loop.

My script is the following.
Code:
SHELL=/bin/bash
PLAYER=/usr/bin/mplayer
SONG=/home/hbar/Music/song.mp3
DISPLAY=:0.0

15 06 * * * /usr/bin/amixer sset Master 10%+ > /dev/null && $PLAYER -loop 5 $SONG > /dev/null 2>&1

However, nothing is happening! If I don't use amixer, song is played in the desired time.

(For testing I was changing the time to a time after 1 minute of the current time, so it's not that I need to wait till 6.15 am.)

Thanks.

Last edited by Franklin52; 08-06-2012 at 03:47 AM.. Reason: Please use code tags for data and code samples
 

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

alarm

Hello I have a server HP ES40 with unix 5.1B, and if i open from Start-Programs-IN Tools-GUI/pfmalarm/Alarm-start monitoring , I receive this error message "IOR : STRING IS TOO LONG ! MAXIMUM SIZE = 1024" Anybody heard about this error? Thanks Alin (0 Replies)
Discussion started by: tomaalin
0 Replies

2. Shell Programming and Scripting

Scripting an alarm

Hi All, I am monitoring batch Processes running in UNIX environment. I use PuTTy to monitor the process running. I have to continuously monitor and look on the screen if some error has come or not. If an error comes FAILURE word is displayed instead of SUCCESS as shown below on the... (2 Replies)
Discussion started by: sampandey31
2 Replies

3. Shell Programming and Scripting

Alarm clock error while executing the script

I am executing perl script on Linux machine and the script is running for the last 5 hours and while running the script I had an error message in a single line Alarm Clock and the script got stopped. I havnt scheduled the script.I have executed the script manually. There is no syntax errors in... (1 Reply)
Discussion started by: scriptscript
1 Replies
Audio::MPD::Common::Status(3pm) 			User Contributed Perl Documentation			   Audio::MPD::Common::Status(3pm)

NAME
Audio::MPD::Common::Status - class representing MPD status VERSION
version 1.120881 DESCRIPTION
The MPD server maintains some information on its current state. Those information can be queried with mpd modules. Some of those information are served to you as an Audio::MPD::Common::Status object. An Audio::MPD::Common::Status object does not update itself regularly, and thus should be used immediately. Note: one should never ever instantiate an Audio::MPD::Common::Status object directly - use the mpd modules instead. ATTRIBUTES
$status->audio; A string with the sample rate of the song currently playing, number of bits of the output and number of channels (2 for stereo) - separated by a colon. $status->bitrate; The instantaneous bitrate in kbps. $status->error; May appear in special error cases, such as when disabling output. $status->playlist; The playlist version number, that changes every time the playlist is updated. $status->playlistlength; The number of songs in the playlist. $status->random; Whether the playlist is read randomly or not. $status->repeat; Whether the song is repeated or not. $status->song; The offset of the song currently played in the playlist. $status->songid; The song id (MPD id) of the song currently played. $status->state; The state of MPD server. Either "play", "stop" or "pause". $status->time; An Audio::MPD::Common::Time object, representing the time elapsed / remainging and total. See the associated pod for more details. $status->updating_db; An integer, representing the current update job. $status->volume; The current MPD volume - an integer between 0 and 100. $status->xfade; The crossfade in seconds. AUTHOR
Jerome Quelin COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Jerome Quelin. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-04-01 Audio::MPD::Common::Status(3pm)
All times are GMT -4. The time now is 07:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy