Click to See Complete Forum and Search --> : Crontab Prob in slack


berb
02-02-2001, 05:45 PM
I want to be able to launch my xmms from a shell script hit by crontab.

script is:

#/bin/bash
echo working
/usr/local/bin/xmms -d &


permissions are rwx across the board and the path is correct, in fact from the CLI if I run it it works fine BUT when I run a crontab, it doesn't work !?! :confused:

I get mail from the daemon that sez 'working' but the player doesn't launch.

BTW the permissions on the xmms are also rwx across the board.

Am I missing something?
running slack 7.1, KDE
:cool: SLACKWARE :cool:

X_console
02-02-2001, 05:50 PM
The first line of your script is wrong. It should be:

#!/bin/bash

berb
02-02-2001, 05:59 PM
nope, still doesn't work

ssadams
02-02-2001, 06:51 PM
what did you post as a line in crontab?

berb
02-03-2001, 11:41 AM
Originally posted by ssadams:
what did you post as a line in crontab?
12 16 * * * /home/dberb/wake

X_console
02-03-2001, 03:11 PM
According to your crontab file, you're trying to run the script at 4:12PM every day. Is this correct?

berb
02-04-2001, 05:10 AM
The shell script runs fine when I run it from the CLI and the crontab works too, I ckeched it with a dummy output file. CRONTAB does not run the /usr/local/bin/xmms line and it is driving me bonkers.

OR, is there another way to launch a timed event that I don't know about, all I want to do is launch my player so I don't have to listen to my stupid alarm clock's BEEP anymore.
thanks

X_console
02-04-2001, 12:33 PM
So the script executes, but it doesn't run xmms? Try calling xmms in the script as follows:

exec /usr/local/bin/xmms -d &

An alternative way of getting something to run at a certain time is to use the "at" command. However, unlike "cront", "at" will run once and then needs to be set again:

at 4:10pm
> /usr/local/bin/xmms -d &
[Ctrl-D]