LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-25-2003, 07:03 PM   #1
naflan
Member
 
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94

Rep: Reputation: 15
Question Suse 8.1 crontab problem?


Hi,
I'm new to this formum. Please help with this issue. I created entries in crontab for root and for another user. I later ran crontab -e and deleted those entries using the vi editor. These entries were still running even though I deleted them. I know they were running because the output is sent to me in an email. The command format was 30 13 * * * /files/linux/folding/status.sh my-email-address . For the one user, I removed crontab by running crontab -r and that seems to have solved the problem for that user (not getting emails from them). For root, I ran crontab -r and then crontab -e to re-enter the command whose time was modified (the script itself was modified as well), but I am getting emails at the old time and using the old script ! For example, I got output today, Sunday at 1:30pm, but according to the new script and new crontab time (00 23 * * * /files/linux/folding/status.sh my-email-address), I shouldn't (see below).

#!/bin/bash
MAIL=$1
DIR=/files/linux/folding
DAYOFWEEK=`date +%w` #0-6, with 0 = Sun
RESULTS=`grep 'Results successfully sent' $DIR/FAHlog.txt`

if test "$RESULTS" != ""; then # If work unit finished
DAYOFWEEK=7 # make it send result
fi

case $DAYOFWEEK in
3|6|7)
/usr/bin/tail $DIR/FAHlog.txt | /usr/bin/mutt -s "FAH | `date`" $MAIL
;;
esac

I should only receive results if condition is met (RESULTS != "") or on Wednesday and Saturday. The results were not met. By the way, this script works fine when ran from command line. Is this a cron problem? I am running Suse 8.1. This same setup works fine on another computer running Debian.
Thanks,
naflan
 
Old 05-26-2003, 01:05 AM   #2
naflan
Member
 
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94

Original Poster
Rep: Reputation: 15
Update: just got email results from the other user - the one whose crontab was removed (crontab -r). When I run crontab -l for this user, I get: no crontab for user. However, this user is apparently still running the script. This user is my wife and I know she isn't running it manually
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab problem pdrobe Red Hat 1 02-05-2005 04:19 PM
Problem with crontab PierrePau Linux - Software 3 06-28-2004 03:34 PM
crontab problem BlackRabbit Linux - General 9 06-17-2004 08:38 AM
Setting up crontab SUSE Linux 8.2 byfaithalone Linux - Newbie 6 02-05-2004 04:42 PM
problem with crontab juanb Linux - Newbie 2 12-16-2003 05:54 AM


All times are GMT -5. The time now is 09:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration