I'm trying to use cron to run a shell script at a specific time, then run another script to stop the initial script 3 and a half hours later. The script will start properly, and running the stop script manually stops the process, but it doesn't seem to run through cron and stop the process. here are the relevant files...
START.SH
Code:
#/bin/bash
TGTD="/home/apps/spec3130/"
OF=spec3130-$(date +%F).rm
#Production line for pushing video to a legacy push server and archiving the file.
/home/apps/producer/producer -pid /tmp/producer.pid -vc /dev/video0 -vp 01 -ac /dev/dsp -ap 06 -cs 640x480 -d 3:30:00 -o $TGTD$OF
wait
STOP.SH
Code:
#!/bin/sh
kill -s 2 $(cat /tmp/producer.pid)
CRONTAB
Code:
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
*/5 * * * * cactiuser php /srv/www/htdocs/cacti/poller.php > /dev/null 2>&1
00 17 * * Thu root /home/apps/start.sh
30 20 * * Thu root /home/apps/stop.sh
I'm a relative newb at shell scripting. any suggestions?