Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
cronjob is not executing.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ArifulHossain tuhin  
View profile  
 More options Feb 1, 2:46 pm
Newsgroups: comp.unix.shell
From: ArifulHossain tuhin <etothepowe...@gmail.com>
Date: Wed, 1 Feb 2012 11:46:53 -0800 (PST)
Local: Wed, Feb 1 2012 2:46 pm
Subject: 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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bit Twister  
View profile  
 More options Feb 1, 3:39 pm
Newsgroups: comp.unix.shell
From: Bit Twister <BitTwis...@mouse-potato.com>
Date: Wed, 1 Feb 2012 20:39:42 +0000 (UTC)
Local: Wed, Feb 1 2012 3:39 pm
Subject: Re: cronjob is not executing.

On Wed, 1 Feb 2012 11:46:53 -0800 (PST), ArifulHossain tuhin wrote:

> it runs fine when i execute it from shell.

Yup.

> but when i add it to the cron tab nothing happens.

So what is different between cron and your shell.

just for fun, put
env > /tmp/env.list
as your first line and let it run.

While waiting do a
env

cat /etc/crontab

at your terminal prompt.

And then there it this search engine
https://www.google.com/advanced_search

Where you can get more than 300 hits from people posting the same
question.

https://www.google.com/search?q=%22cronjob+is+not+executing%22&hl=en&...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »