I don't think you can specify variables in cron like that. You can only specify a few things like SHELL.
Also, what's your window manager? GNOME virally hijacks your file permissions via hooks in PAMD and other things, to control who gets permissions to use devices depending on your graphical login. Ergo you may not have permissions to access your sound device until you do a login, no matter what file permissions your sound devices are set to or what groups you belong to. (Or be given permissions without the proper groups or access, for that matter!)
Also, DISPLAY is not needed to play music. Specify -vo null so mplayer doesn't try to open one anyway and die when it can't get into your X context.
Last edited by Corona688; 08-05-2012 at 06:22 PM..
The percent sign (%) is a special character in a crontab command. From the man page
Quote:
The "sixth" field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or a "%" character, will be executed
by /bin/sh or by the shell specified in the SHELL variable of the cronfile. A "%" character in the command, unless escaped with a backslash (\), will be changed into
newline characters, and all data after the first % will be sent to the command as standard input.
Given this, the command that you are executing isn't what you think it is. Try adding a back slant before the percentage: 10\%
Putting a baclslash makes it work. Thanks. However, voume does not keep on increasing!
@Corona688
I'm using gnome desktop in ubuntu 12.04. I copied the structure from the internet and many places \dev\null is mentioned. Now, as I just said, it's working but volume is not increasing by 10% !
Putting a baclslash makes it work. Thanks. However, voume does not keep on increasing!
@Corona688
I'm using gnome desktop in ubuntu 12.04. I copied the structure from the internet and many places \dev\null is mentioned. Now, as I just said, it's working but volume is not increasing by 10% !
The way you have your command written, I wouldn't expect the volume to increase. The mixer command is invoked once, and if successful (&&) mplayer is invoked to play the mp3 looping through it 5 times.
If you want to bump the volume with each cycle through the file I would write a small script (alarm.bash or somesuch) and invoke that from cron. The script would look something like this:
In addition to Carona's suggestion, I'd toss in -really-quiet to cut the overhead of updates directed to /dev/null.
Last edited by agama; 08-05-2012 at 11:25 PM..
Reason: typo/added default volume setting
The way you have your command written, I wouldn't expect the volume to increase. The mixer command is invoked once, and if successful (&&) mplayer is invoked to play the mp3 looping through it 5 times.
If you want to bump the volume with each cycle through the file I would write a small script (alarm.bash or somesuch) and invoke that from cron. The script would look something like this:
In addition to Carona's suggestion, I'd toss in -really-quiet to cut the overhead of updates directed to /dev/null.
Are you meaning to execute from /etc/crontab? Can't I do it by
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)
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)
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)