Re: crontab doesn't work

2006-03-24 Thread Demian

Rodrigo G. Tavares de Souza wrote:

Hi,

  Do I have to start something to crontab works?

configuration file:
#  MINHOUR   DAY/MONTH   MONTH   DAY/WEEK USERCOMMAND
  59  23 *** root
/usr/local/etc/sarg/make-report
  0   0  **0 squid   
/usr/local/etc/sbin/squid -k rotate


 It should generate a report every day, and clear the log file every 
week, but it isn't hapaning!

 What do I suppose to do?



Hello,

I checked my crontabs and I don't have double quotes around the 
path/script name. You could try to remove them.


Do the scripts work if you run them from the command line?

To check if cron is running, issue this command:

ps auwx | grep cron

The output should look something like this:

root 421  0.0  0.2  1312   896  ??  Is8Mar06   0:05.41 
/usr/sbin/cron -s


If cron isn't running, try this:

/etc/rc.d/cron start

Hope this helps,
Demian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: crontab doesn't work

2006-03-24 Thread Eric Schuele

Rodrigo G. Tavares de Souza wrote:

Hi,

  Do I have to start something to crontab works?

configuration file:
#  MINHOUR   DAY/MONTH   MONTH   DAY/WEEK USERCOMMAND
  59  23 *** root
/usr/local/etc/sarg/make-report
  0   0  **0 squid   
/usr/local/etc/sbin/squid -k rotate




Is your machine in fact on at the specified times?
Did you use crontab(1) to edit and install the crontab file?

 It should generate a report every day, and clear the log file every 
week, but it isn't hapaning!

 What do I suppose to do?

Best regards
Rodrigo Souza
Analista Programador
Sao Paulo - Brazil
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]





--
Regards,
Eric
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: crontab doesn't work

2006-03-24 Thread Kevin Kinsey

Rodrigo G. Tavares de Souza wrote:


Hi,

  Do I have to start something to crontab works?

configuration file:
#  MINHOUR   DAY/MONTH   MONTH   DAY/WEEK USERCOMMAND
  59  23 *** root
/usr/local/etc/sarg/make-report
  0   0  **0 squid   
/usr/local/etc/sbin/squid -k rotate


 It should generate a report every day, and clear
the log file every week, but it isn't hapaning!
 What do I suppose to do?

Best regards
Rodrigo Souza
Analista Programador
Sao Paulo - Brazil




Hello, Rodrigo

1.  Is cron running now?  Can you find any mention of
cron in your logs (esp /var/run/dmesg/boot)?  Does it
get mentioned in the boot process (watch the screen)...
cron should be started by init(8) as part of the rc(8) process
(the last of the boot stage, prior to going multi-user).

2.  Just out of curiousity and a desire to help, what's the
path to the configuration file above? :)

3.  Reasoning:  It appears that you have modified /etc/crontab. 
In BSD-land, you usually want to use the root crontab (which

is under /var/cron/tabs/root) or your personal account
crontab (/var/cron/tabs/username) to do cron work.
However, you don't want to edit this file directly.
Make sure $EDITOR is set to your favorite text editor
and run crontab -e to set up your crontab.  Exit
the editor, and crontab(1) will put the file in place for
you.  Incidentally, this may be the cause of your problem
entirely.  (See the FAQ, 10.3, 'Why do I get messages like
root: not found after editing my crontab file?').

4.  I'm sure you're aware of cron's limited $PATH and
other limitations.  Make sure your scripts are executable
and shebanged, or else call them with the appropriate
shell interpreter's full pathname, e.g. (/bin/sh ~/scripts/mybackup.sh).

HTH,

Kevin Kinsey


--
WARNING TO ALL PERSONNEL:

Firings will continue until morale improves.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: crontab doesn't work

2006-03-24 Thread RW
On Friday 24 March 2006 21:52, Kevin Kinsey wrote:

 3.  Reasoning:  It appears that you have modified /etc/crontab.
 In BSD-land, you usually want to use the root crontab (which
 is under /var/cron/tabs/root) or your personal account
 crontab (/var/cron/tabs/username) to do cron work.

What's wrong with the system crontab? 

One of the entries runs as squid, so it seems sensible to do it the way he has 
done it.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]