Linux / UNIX Tech Support Forum
This is a discussion on Problem executing script through at within the Shell scripting forums, part of the Development/Scripting category; Hey fellows, i've got a probkem while executing a command through a scheduled at-job; Somehow my script starts looping, when ...
|
Register free or login to your existing account and remove all advertisements. |
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hey fellows,
i've got a probkem while executing a command through a scheduled at-job; Somehow my script starts looping, when triggered throug at; It doesnt do so if started manually. Any ideas? Code:
#!/bin/sh
# atrun uid=33 gid=33
# mail www-data 0
umask 22
cd /var/django/webripper/ripper || {
echo 'Execution directory inaccessible' >&2
exit 1
}
set -o xtrace ; mplayer -dumpstream mms://stream1.orf.at/fm4_live -really-quiet -dumpfile /var/www/media/recordings/test.wmv < /dev/null &> /dev/null &
MPID=$! ; echo $$ > /var/www/media/recordings/test.pid ;
echo $MPID $$ $! ;
sleep 60 ;
kill $MPID ;
exit 0 ;
Code:
Subject: Output from your job 20 To: www-data + mplayer -dumpstream mms://stream1.orf.at/fm4_live -really-quiet -dumpfile /var/www/media/recordings/test.wmv + MPID=20360 + echo 20357 + echo 20360 20357 20360 20360 20357 20360 + sleep 60 + ev/null + MPID=22321 + echo 20357 + echo 22321 20357 22321 22321 20357 22321 + sleep 60 Code:
ev/null this is the way i start the script manually, btw: Code:
# sudo -u www-data /bin/sh atjob_xtrace.sh + mplayer -dumpstream mms://stream1.orf.at/fm4_live -really-quiet -dumpfile /var/www/media/recordings/test.wmv + MPID=5693 + echo 5692 + echo 5693 5692 5693 5693 5692 5693 + sleep 60 + kill 5693 + exit 0 Code:
# sudo -u www-data at now -f atjob_xtrace.sh warning: commands will be executed using /bin/sh job 22 at Mon Apr 6 19:51:00 2009 # cat /var/spool/cron/atspool/a00016013b1aaf Subject: Output from your job 22 To: root + mplayer -dumpstream mms://stream1.orf.at/fm4_live -really-quiet -dumpfile /var/www/media/recordings/test.wmv + MPID=20321 + echo 20318 + echo 20321 20318 20321 20321 20318 20321 + sleep 60 + dev/null + MPID=21911 + echo 20318 + echo 21911 20318 21911 21911 20318 21911 + sleep 60 Quote:
thx in advance viktor |
| Sponsored Links | ||
|
|
|
||||
|
Try using full path names for binaries for example you should use mplayer full path such as /usr/bin/mplayer.
__________________
Vivek Gite Linux Evangelist |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "tar xvf" command is executing very slow | prahladkumar | CentOS / RHEL / Fedora | 0 | 04-02-2009 03:44 PM |
| Executing .exe files in Red Hat Linux AS4 | shilpigoel1 | Linux software | 2 | 12-09-2008 07:34 PM |
| cgi script downloads - instead of executing | sathiya | Ubuntu / Debian | 2 | 06-13-2008 01:14 PM |
| avoid displaying errors while executing a script | vikas027 | Shell scripting | 4 | 10-31-2007 11:57 AM |
| problem in script | sania | Getting started tutorials | 0 | 09-14-2007 04:25 PM |