cronjob is not executing.



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
.



Relevant Pages

  • Re: [kde-linux] Mounting with exec flag
    ... And I can copy a shell script to both devices and then execute ... UDEV config problem [if KDE uses UDEV info to mount devices) (I use ...
    (KDE)
  • Re: Calling shell script from a Servlet.
    ... > When I try to do the same thing from a Servlet I get nothing. ... > because Tomcat should be able to find a directory where shell script ... Should I put a symbolic link somewhere in Tomcat home ... read / execute to bash, and possibly read and even execute on all the ...
    (comp.lang.java.programmer)
  • Re: How to selectivey route messages?
    ... > shell script to execute at boot time (but not the one that goes: ... > have to be a real Internet user. ... > I also want to plow through the ip program document and the "Linux Advanced ...
    (comp.os.linux.misc)
  • problems redirecting an open file to stdin using dup2()
    ... The shell script is expecting input from stdin. ... I cannot get this to execute period. ... if I change fopenfor openor freopenand make fp an int, ...
    (comp.unix.programmer)
  • Re: Oracle dbi ?
    ... Can you execute a command line ... > shell script using OCI? ... Not using OCI, but Perl can run SQL*Plus very nicely. ...
    (perl.dbi.users)