LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-30-2006, 03:44 AM   #1
broadcast
LQ Newbie
 
Registered: Aug 2006
Posts: 11

Rep: Reputation: 0
crontab


Hello,
am new to linux, and am trying to configure a shell script to work twice a day at 3:15,
somehow it doesn't wor with the error says sh command not found,
what am I doing?

Code:
#crontab -e
Code:
#ur    mday    month   wday    who     command
0       3,15    *       *       *       root    /etc/periodic/McAfeeUpdate.sh
what is wrong?
and also i would appreciate if someone can lead me or through me at some to read on how to change defualt reporting email on linux box, RH, Debian or FC5 from root@localhost to be myaddress@mydomain.com

thank you
 
Old 08-30-2006, 04:07 AM   #2
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Your cron entry seems to be fine (assuming you mean to run the script at 3:00 am and 3:00 pm). It might be an error in your script. Could you post a head /etc/periodic/McAfeeUpdate.sh.

EDIT: err.. didn't see your command parameter correctly. Why are you specifying the root user there? Only system cron jobs can specify users. You want to enter:

0 3,15 * * * /etc/periodic/McAfeeUpdate.sh

If you want logwatch information to another email address you'll need to edit /etc/log.d/logwatch.conf. Edit the MailTo parameter to reflect your preferences. This is for RedHat and FC5.

Last edited by SlackDaemon; 08-30-2006 at 04:16 AM.
 
Old 08-30-2006, 11:06 AM   #3
broadcast
LQ Newbie
 
Registered: Aug 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you SlackDaemon, that was fast,
I appreciate your help,

below is the mcafee update script am trying to run,

[CODE][#!/bin/sh
#
# Update McAfee virus definitions

MCAFEE_DIR=/var/CommuniGate/CGPMcAfee/
UPDATE_CMD=/var/CommuniGate/CGPMcAfee/updateDatFiles
MAILER_CMD="/usr/bin/mail -s 'cron: McAfee Update Report'"
REPORT_ADR="postmaster"
/CODE]

now my crontab looks like
Code:
0       18,15    *       *       *        /etc/periodic/McAfeeUpdate.sh
regards
 
  


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 x2??? killahsmurf Slackware 2 05-24-2005 11:53 PM
Crontab wormraper Debian 4 05-15-2005 02:01 AM
Crontab reynacho_au Linux - Software 6 12-28-2004 04:09 AM
new to crontab desbyleo Solaris / OpenSolaris 15 12-16-2004 04:04 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM


All times are GMT -5. The time now is 02:13 PM.

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