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
rhythmbox-client(1)						   User Commands					       rhythmbox-client(1)

NAME
rhythmbox-client - controls a running instance of rhythmbox SYNOPSIS
rhythmbox-client [--clear-queue] [--debug] [--enqueue=filename] [--help] [--hide] [--mute] [--next] [--no-present] [--no-start] [--notify] [--pause] [--play] [--play-pause] [--play-uri=uri] [--previous] [--print-playing] [--print-playing-format=format] [--print-volume] [--quit] [--set-volume=float] [--unmute] [--volume-down] [--volume-up] DESCRIPTION
rhythmbox-client is a tool for controlling an already running instance of rhythmbox. It is useful for remote control scripting or printing details of what is playing. OPTIONS
The following options are supported: --client-queue Empty the play queue before adding new tracks. --debug Display debug output. --enqueue=filename Add specified tracks already in the library to the play queue. -?, --help Show help options. --hide Hide the rhythmbox-client window. --mute Mute playback. --next Jump to next song. --no-present Do not present an existing rhythmbox-client window. --no-start Do not start a new instance of rhythmbox-client. --notify Show notification of the playing song. --pause Pause playback if currently playing. --play Resume playback if currently paused. --play-pause Toggle play/pause mode. --play-uri=uri Play a specified uri, importing it if necessary. --previous Jump to previous song. --print-playing Print the title and artist of the playing song. --print-playing-format=format Print the formatted details of the song. Refer to the extended description to see valid format options. Multiple options can be combined using quotes. For example "%tn %aa %tt", will print the track number fol- lowed by the artist and the title of the track. --print-volume Print the current playback volume. --quit Quit Rhythmbox. --set-volume=float Set the playback volume. --unmute Unmute playback --volume-down Decreate the playback volume. --volume-up Increase the playback volume. EXTENDED DESCRIPTION
rhythmbox-client accepts the following format options to be used with the --print-playing-format option: %at Album title %aT Album title in lowercase %aa Album artist %aA Album artist in lowercase %ay Release year of album %an Album disc number %aN Album disc number with leading zero %ag Album genre %aG Album genre in lowercase %tt Track title %tT Track title in lowercase %ta Track artist %tA Track artist in lowercase %tn Track number %tN Track number with leading zero %td Track duration %te Elapsed time of track EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/rhythmbox-client Executable for rhythmbox-client /usr/lib/rhythmbox/plugins Location of rhythmbox-client plugins. /usr/share/gtk-doc/html/rhythmbox Location of developer documentation for writing a rhythmbox-client plugin. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-media-player | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
rhythmbox(1), attributes(5) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2007. SunOS 5.11 3 Dec 2007 rhythmbox-client(1)
All times are GMT -4. The time now is 04:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy