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).
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
case $DAYOFWEEK in
/usr/bin/tail $DIR/FAHlog.txt | /usr/bin/mutt -s "FAH | `date`" $MAIL
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.