The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem running shell script (for oracle export) in crontab jsheehan223 Shell Programming and Scripting 1 10-16-2008 04:29 PM
Unix script Problem with crontab vrjalli SUN Solaris 8 01-16-2008 02:45 PM
how to execute sh script in bash shell via crontab jigarlakhani UNIX for Dummies Questions & Answers 1 06-23-2007 09:50 PM
Problem with executing a script scheduled in crontab Amardeep Shell Programming and Scripting 4 07-07-2006 01:51 AM
bash script problem fnoyan Shell Programming and Scripting 1 02-15-2004 10:51 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-28-2009
wessberg wessberg is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 1
Problem with crontab + bash script

Crontab:
16 14 * * * /root/bin/./empty_mail.sh >> /root/bin/log.txt


L=`mailq |grep -c frozen`
echo "${NUMMAIL} frozen mail to be removed from the mailq"
#echo "Press Enter to continue"
#read CONTINUE
echo -en "-> "
for i in `mailq | grep frozen | awk '{print $3}'` ; do
exim4 -Mrm $i > /dev/null
done
echo "# Done"
echo ""


The script starts, but it doesnt clean the frozen mailque.

Anyone have a clue?
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0