Click to See Complete Forum and Search --> : Crontab Confusion
carebear
11-28-2000, 11:01 AM
Hello,
My plans have been foiled by the cunning crontab.
I am currently attempting to setup Portsentry and Logcheck on a SuSE 7.0 system, Portsentry seems to be running fine, but I can't get Logcheck to run correctly....
The entry in crontab to make logcheck run does'nt seem to be working.
Would an entry in /etc/rd.d/boot.local resolve this ????
Thanks for any help in advance.
X_console
11-28-2000, 03:48 PM
What's your entry in crontab?
carebear
11-29-2000, 04:41 AM
0 30 * * * root /bin/sh /usr/local/etc/logcheck.sh
Set to run every half hour, or at least thats the idea, I read somewhere that I'll need syslog running before Logcheck will run ?
doing a ps -aux I can see that syslogd is already running, Ummm ?
Any ideas,
Cheers for any help
iDxMan
11-30-2000, 12:22 AM
Originally posted by carebear:
0 30 * * * root /bin/sh /usr/local/etc/logcheck.sh
Set to run every half hour, or at least thats the idea, I read somewhere that I'll need syslog running before Logcheck will run ?
That crontab entry doesn't look right.
Try:
30 * * * * root /bin/sh /usr/local/etc/logcheck.sh
In theory, yours would run on hour 30 (which is invalid since you can only have an entry of 0-23 for the hour field) on minute 0 every day/week/month/day of week..
Did /var/log/syslog or /var/log/cron give you any errors?
-r
[This message has been edited by iDxMan (edited 29 November 2000).]
Craig McPherson
11-30-2000, 12:33 AM
Originally posted by iDxMan:
30 * * * * root /bin/sh /usr/local/etc/logcheck.sh
That would make it run at 30 minutes after every hour, however the poster mentions he was trying to make it run every half-hour. You'd do that like this:
0,30 * * * * root /bin/sh /usr/local/etc/logcheck.sh
That means at 0 minutes after every hour AND thirty minutes after every hour, in affect, every thirty minutes.
It looks like the original poster had the right idea but just left out the comma between the 0 and the 30.
------------------
http://users.ipa.net/~cmcpher/paminv.gif DEBIAN (http://www.debian.org/) http://users.ipa.net/~cmcpher/paminv.gif
It turns girls into statues!
[This message has been edited by Craig McPherson (edited 29 November 2000).]
ph34r
11-30-2000, 12:34 AM
try
1 * * * * /whatever/command/you/wanted
31 * * * * /whatever/command/you/wanted
iDxMan
11-30-2000, 12:57 AM
Originally posted by Craig McPherson:
You'd do that like this:
0,30 * * * * root /usr/local/etc/logcheck.sh
That means at 0 minutes after every hour AND thirty minutes after every hour, in affect, every thirty minutes.
It looks like the original poster had the right idea but just left out the comma between the 0 and the 30.
Good point .. My brain is on standby tonight.
How about:
*/30 * * * * root /usr/local/etc/logcheck.sh
??
I faintly remember using this at one point.
-r