I have the following shell script
$cat capture.sh
TIME=$(date +"%H-%M-%d-%m-%y")
IP="203.208.198.29"
PREFIX=$TIME$IP
tshark -f "udp" -i eth0 -w /root/captures/$PREFIX.cap&
pid=$!
sleep 2m
kill $pid
it runs fine when i execute it from shell.
but when i add it to the cron tab nothing happens.
my crontab entry : 1 */2 * 2 3,4,5 sh /root/capture.sh
tail /var/log/cron
shows that the command has executed .
but nothing happens. i have set executable permission for "all" for capture.sh and write permission for "all" for /root/captures directory.
Thanks in advance