Re: Newbie question: Why aren't my cron jobs running?
On Tue, 12 Jun 2012 12:21:31 -0500, Dan Lists wrote: The syntax of his crontab file is correct. Vixie cron does care about leading spaces, tabs, extra spaces, or leading zeros. Earlier versions of cron are much pickier about the crontab file. The cron logs show that it is starting his jobs at the correct times. It is far more likely that there is a problem with the scripts. A very common cause of problems with scripts run from cron is that they do not inherit your environment. Do the scripts run from the command line? If the do, then the problem is most likely something in your environment that the scripts need. I'm a complete idiot, and I feel embarrassed. Everything was fine, except that I had missed out '/bin' in the paths of the jobs. I had: /home/walterh/exports.sh /home/walterh/backup_etc.sh /home/walterh/systemcheck.sh /home/walterh/backup_bsd.sh which should of course have been: /home/walterh/bin/exports.sh /home/walterh/bin/backup_etc.sh /home/walterh/bin/systemcheck.sh /home/walterh/bin/backup_bsd.sh What a stupid mistake! Thanks for all the replies, but I must say sorry for wasting your time. Sorry! WH ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On 6/13/2012 6:23 PM, Walter Hurry wrote: On Tue, 12 Jun 2012 12:21:31 -0500, Dan Lists wrote: The syntax of his crontab file is correct. Vixie cron does care about leading spaces, tabs, extra spaces, or leading zeros. Earlier versions of cron are much pickier about the crontab file. The cron logs show that it is starting his jobs at the correct times. It is far more likely that there is a problem with the scripts. A very common cause of problems with scripts run from cron is that they do not inherit your environment. Do the scripts run from the command line? If the do, then the problem is most likely something in your environment that the scripts need. I'm a complete idiot, and I feel embarrassed. Everything was fine, except that I had missed out '/bin' in the paths of the jobs. I had: /home/walterh/exports.sh /home/walterh/backup_etc.sh /home/walterh/systemcheck.sh /home/walterh/backup_bsd.sh which should of course have been: /home/walterh/bin/exports.sh /home/walterh/bin/backup_etc.sh /home/walterh/bin/systemcheck.sh /home/walterh/bin/backup_bsd.sh What a stupid mistake! Thanks for all the replies, but I must say sorry for wasting your time. Sorry! WH ... Damned those full path names. -- Keep well, Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On 11/06/2012 23:10, Michael Sierchio wrote: On Mon, Jun 11, 2012 at 7:04 PM, Walter Hurry walterhu...@gmail.com wrote: As the subject says, this is probably a newbie question (I am new to FreeBSD but quite experienced at Linux). FreeBSD9 on x86_64. Cron is running: $ ps -ax|grep cron 1513 ?? Is 0:00.01 /usr/sbin/cron -s 2283 0 S+ 0:00.00 grep cron $ I have a syntactically valid crontab: $ crontab -l #min hr dom month dow command SHELL=/bin/bash Pitfall: Even if bash is installed, it's not usually under /bin, but under /usr/local/bin PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ daddy/bin HOME=/home/walterh 00 02 * * * /home/walterh/exports.sh 05 02 * * * /home/walterh/backup_etc.sh 10 02 * * * /home/walterh/systemcheck.sh 15 02 * * * /home/walterh/backup_bsd.sh $ So what is wrong? Why is nothing happening? I have consulted the handbook but see nothing. Have you installed bash? It's not in the system base. What's in your shell scripts? - M ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Tue, 12 Jun 2012 00:06:21 -0500, Robert Bonomi bon...@mail.r-bonomi.com wrote: Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers will not be column aligned, but it is a small price to pay to avoid the hair-tearing that =will= ensue when using it bites you. Any other info on this? I've never heard of this before and I've never seen an issue using leading zeroes on the minutes value. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
Mark Felder f...@feld.me writes: On Tue, 12 Jun 2012 00:06:21 -0500, Robert Bonomi bon...@mail.r-bonomi.com wrote: Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers will not be column aligned, but it is a small price to pay to avoid the hair-tearing that =will= ensue when using it bites you. Any other info on this? I've never heard of this before and I've never seen an issue using leading zeroes on the minutes value. I don't have ready access to source at the moment, but I would expect (like the normal C I/O functions) it will be interpreted as octal. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Tue, 12 Jun 2012 09:36:37 -0500, Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org wrote: I don't have ready access to source at the moment, but I would expect (like the normal C I/O functions) it will be interpreted as octal. Suppose we could always ask Paul Vixie :-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Tue, 12 Jun 2012 08:29:02 -0500, Mark Felder wrote: On Tue, 12 Jun 2012 00:06:21 -0500, Robert Bonomi bon...@mail.r-bonomi.com wrote: Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers will not be column aligned, but it is a small price to pay to avoid the hair-tearing that =will= ensue when using it bites you. Any other info on this? I've never heard of this before and I've never seen an issue using leading zeroes on the minutes value. There are some specific interpretations that _may_ be interpreted according to the C rules, e. g. prefix 0x- for hexadecimal or 08- for octal notation. For example, 083 != 83, just as 0x83 != 83. As it has been mentioned, spaces also have a significant meaning in crontabs, so they cannot be used everywhere to align data columns. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Tue, Jun 12, 2012 at 12:06 PM, Polytropon free...@edvax.de wrote: On Tue, 12 Jun 2012 08:29:02 -0500, Mark Felder wrote: On Tue, 12 Jun 2012 00:06:21 -0500, Robert Bonomi bon...@mail.r-bonomi.com wrote: Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers will not be column aligned, but it is a small price to pay to avoid the hair-tearing that =will= ensue when using it bites you. Any other info on this? I've never heard of this before and I've never seen an issue using leading zeroes on the minutes value. There are some specific interpretations that _may_ be interpreted according to the C rules, e. g. prefix 0x- for hexadecimal or 08- for octal notation. For example, 083 != 83, just as 0x83 != 83. As it has been mentioned, spaces also have a significant meaning in crontabs, so they cannot be used everywhere to align data columns. The syntax of his crontab file is correct. Vixie cron does care about leading spaces, tabs, extra spaces, or leading zeros. Earlier versions of cron are much pickier about the crontab file. The cron logs show that it is starting his jobs at the correct times. It is far more likely that there is a problem with the scripts. A very common cause of problems with scripts run from cron is that they do not inherit your environment. Do the scripts run from the command line? If the do, then the problem is most likely something in your environment that the scripts need. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Newbie question: Why aren't my cron jobs running?
As the subject says, this is probably a newbie question (I am new to FreeBSD but quite experienced at Linux). FreeBSD9 on x86_64. Cron is running: $ ps -ax|grep cron 1513 ?? Is 0:00.01 /usr/sbin/cron -s 2283 0 S+ 0:00.00 grep cron $ I have a syntactically valid crontab: $ crontab -l #min hr dom month dow command SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ daddy/bin HOME=/home/walterh 00 02 * * * /home/walterh/exports.sh 05 02 * * * /home/walterh/backup_etc.sh 10 02 * * * /home/walterh/systemcheck.sh 15 02 * * * /home/walterh/backup_bsd.sh $ So what is wrong? Why is nothing happening? I have consulted the handbook but see nothing. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Mon, Jun 11, 2012 at 7:04 PM, Walter Hurry walterhu...@gmail.com wrote: As the subject says, this is probably a newbie question (I am new to FreeBSD but quite experienced at Linux). FreeBSD9 on x86_64. Cron is running: $ ps -ax|grep cron 1513 ?? Is 0:00.01 /usr/sbin/cron -s 2283 0 S+ 0:00.00 grep cron $ I have a syntactically valid crontab: $ crontab -l #min hr dom month dow command SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ daddy/bin HOME=/home/walterh 00 02 * * * /home/walterh/exports.sh 05 02 * * * /home/walterh/backup_etc.sh 10 02 * * * /home/walterh/systemcheck.sh 15 02 * * * /home/walterh/backup_bsd.sh $ So what is wrong? Why is nothing happening? I have consulted the handbook but see nothing. Have you installed bash? It's not in the system base. What's in your shell scripts? - M ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Mon, 11 Jun 2012 19:10:21 -0700, Michael Sierchio wrote: Have you installed bash? It's not in the system base. What's in your shell scripts? Thanks for the quick response. $ pkg_info|grep bash bash-4.2.28 The GNU Project's Bourne Again SHell $ which bash /bin/bash $ $ less $HOME/bin/exports.sh #!/bin/bash LOG=$HOME/log/exports.log logger -t walterh-cronjob Exports started echo Exports started at `date` $LOG rm $HOME/postgresql/* psql packages -f $HOME/sql/exports.sql cd $HOME/postgresql tar cfz postgresql.tgz * rm *csv echo Exports finished at `date` $LOG logger -t walterh-cronjob Exports finished /home/walterh/bin/exports.sh (END) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Mon, Jun 11, 2012 at 7:25 PM, Walter Hurry walterhu...@gmail.com wrote: cat /etc/shells ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Mon, 11 Jun 2012 21:21:12 -0500, Adam Vande More wrote: You really have bash in /bin ? Are your scripts executable? What does /var/log/cron say? $ file /bin/bash /bin/bash: symbolic link to `/usr/local/bin/bash' $ sudo tail -50 /var/log/cron (result snipped at 02:22:00 for brevity) Jun 12 01:55:00 jupiter /usr/sbin/cron[1780]: (root) CMD (/usr/libexec/ atrun) Jun 12 02:00:00 jupiter /usr/sbin/cron[1823]: (root) CMD (newsyslog) Jun 12 02:00:00 jupiter /usr/sbin/cron[1825]: (operator) CMD (/usr/ libexec/save-entropy) Jun 12 02:00:00 jupiter /usr/sbin/cron[1824]: (root) CMD (/usr/libexec/ atrun) Jun 12 02:00:00 jupiter /usr/sbin/cron[1836]: (walterh) CMD (/home/ walterh/exports.sh) Jun 12 02:01:00 jupiter /usr/sbin/cron[1849]: (root) CMD (adjkerntz -a) Jun 12 02:05:00 jupiter /usr/sbin/cron[1874]: (root) CMD (/usr/libexec/ atrun) Jun 12 02:05:00 jupiter /usr/sbin/cron[1875]: (walterh) CMD (/home/ walterh/backup_etc.sh) Jun 12 02:10:00 jupiter /usr/sbin/cron[1912]: (root) CMD (/usr/libexec/ atrun) Jun 12 02:10:00 jupiter /usr/sbin/cron[1913]: (walterh) CMD (/home/ walterh/systemcheck.sh) Jun 12 02:11:00 jupiter /usr/sbin/cron[1924]: (operator) CMD (/usr/ libexec/save-entropy) Jun 12 02:15:00 jupiter /usr/sbin/cron[1981]: (root) CMD (/usr/libexec/ atrun) Jun 12 02:15:00 jupiter /usr/sbin/cron[1982]: (walterh) CMD (/home/ walterh/backup_bsd.sh) Jun 12 02:20:00 jupiter /usr/sbin/cron[2013]: (root) CMD (/usr/libexec/ atrun) Jun 12 02:22:00 jupiter /usr/sbin/cron[2025]: (operator) CMD (/usr/ libexec/save-entropy) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On Mon, 11 Jun 2012 19:36:28 -0700, Michael Sierchio wrote: cat /etc/shells $ cat /etc/shells # $FreeBSD: release/9.0.0/etc/shells 59717 2000-04-27 21:58:46Z ache $ # # List of acceptable shells for chpass(1). # Ftpd will not allow users to connect who are not using # one of these shells. /bin/sh /bin/csh /bin/tcsh /usr/local/bin/bash /usr/local/bin/rbash $ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
On 6/11/2012 9:25 PM, Walter Hurry wrote: On Mon, 11 Jun 2012 19:10:21 -0700, Michael Sierchio wrote: Have you installed bash? It's not in the system base. What's in your shell scripts? Thanks for the quick response. $ pkg_info|grep bash bash-4.2.28 The GNU Project's Bourne Again SHell $ which bash /bin/bash $ $ less $HOME/bin/exports.sh #!/bin/bash LOG=$HOME/log/exports.log logger -t walterh-cronjob Exports started echo Exports started at `date` $LOG rm $HOME/postgresql/* psql packages -f $HOME/sql/exports.sql cd $HOME/postgresql tar cfz postgresql.tgz * rm *csv echo Exports finished at `date` $LOG logger -t walterh-cronjob Exports finished /home/walterh/bin/exports.sh (END) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org I tend to use full path names in my shell scripts. So for shits n giggles, try that. Instead of tar cfz postgresql.tgz * Try /bin/tar cfz postgresql.tgz * etc, etc, etc Use the paths for all commands such as rm, psql, logger etc. -- Keep well, Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Newbie question: Why aren't my cron jobs running?
Walter Hurry walterhu...@gmail.com wrote: As the subject says, this is probably a newbie question (I am new to FreeBSD but quite experienced at Linux). FreeBSD9 on x86_64. Cron is running: $ ps -ax|grep cron 1513 ?? Is 0:00.01 /usr/sbin/cron -s 2283 0 S+ 0:00.00 grep cron $ I have a syntactically valid crontab: 'Syntactically valid', yes, but I believe it does not mean what you think it does applies. more below. $ crontab -l #min hr dom month dow command SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ daddy/bin HOME=/home/walterh 00 02 * * * /home/walterh/exports.sh 05 02 * * * /home/walterh/backup_etc.sh 10 02 * * * /home/walterh/systemcheck.sh 15 02 * * * /home/walterh/backup_bsd.sh $ So what is wrong? Why is nothing happening? I have consulted the handbook but see nothing. It _appears_ that there is whitespace _before_ the purporte 'minutes' value on each line that you intend to invoke a command. If so, -THAT- is probably what is causinng the unexpected behavior. I believe cron is looking for the 'minutes' value _before_ any white space, and using a value of '0' when it finds 'nothing' before the white-space Field-separator. That, thus, the all the commands run at 'zero minutes' past the various hours, on the -second- day of the month, and that command-line that cron would -attempt- to execute on the 2nd looks like, * /home/walterh/systemcheck.sh, which, of course will have *wildly* unexpected results, epecially if the first element of the '*' expansion _is_ marked as executable. Remove the leading white-space and things should work the way you 'expect'. Comment: using a leading zero on the numeric fields is a BAD IDEA(tm) -- you are *strongly* encocuraged to remove them. Yes, that means numbers will not be column aligned, but it is a small price to pay to avoid the hair-tearing that =will= ensue when using it bites you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: cron not running
On Thu, 28 Dec 2006, steve wrote: It has been a long time since I've had to post for help, so forgive me if this question is misplaced or stupid. I have a freebsd server running at home now for years with no problems. Over the years it has been rebooted a few times either on purpose or do to things like power failures. It has always started up without problems. On the 12/27 I shut down the server so I could physically clean the server (was getting kinda gross with dust balls and stuff). It started up no problems but rather curiously the cron service does not seem to be processing any jobs now. I am not sure where to go about figuring out what the problem is or how to fix it. I would greatly appreciate any help or guidance from people here on this issue. Steve www.digitalbluesky.net ___ You can use the ps command to find out if cron is running: ps aux | grep cron It should show you /usr/sbin/cron cron is started with defaults in /etc/defaults/rc.conf as modified by /etc/rc.conf. Annelise ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
cron not running
It has been a long time since I've had to post for help, so forgive me if this question is misplaced or stupid. I have a freebsd server running at home now for years with no problems. Over the years it has been rebooted a few times either on purpose or do to things like power failures. It has always started up without problems. On the 12/27 I shut down the server so I could physically clean the server (was getting kinda gross with dust balls and stuff). It started up no problems but rather curiously the cron service does not seem to be processing any jobs now. I am not sure where to go about figuring out what the problem is or how to fix it. I would greatly appreciate any help or guidance from people here on this issue. Steve www.digitalbluesky.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cron not running
Check the clock. Often older systems have dead batteries so the clock is so far out of whack cron jobs don't run. -Derek At 08:18 AM 12/28/2006, steve wrote: It has been a long time since I've had to post for help, so forgive me if this question is misplaced or stupid. I have a freebsd server running at home now for years with no problems. Over the years it has been rebooted a few times either on purpose or do to things like power failures. It has always started up without problems. On the 12/27 I shut down the server so I could physically clean the server (was getting kinda gross with dust balls and stuff). It started up no problems but rather curiously the cron service does not seem to be processing any jobs now. I am not sure where to go about figuring out what the problem is or how to fix it. I would greatly appreciate any help or guidance from people here on this issue. Steve www.digitalbluesky.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cron not running
Hello, Make sure to use full path in the cron command file, like so: /usr/sbin/ntpdate time.server.anywhere Derek Ragona skrev: Check the clock. Often older systems have dead batteries so the clock is so far out of whack cron jobs don't run. -Derek At 08:18 AM 12/28/2006, steve wrote: It has been a long time since I've had to post for help, so forgive me if this question is misplaced or stupid. I have a freebsd server running at home now for years with no problems. Over the years it has been rebooted a few times either on purpose or do to things like power failures. It has always started up without problems. On the 12/27 I shut down the server so I could physically clean the server (was getting kinda gross with dust balls and stuff). It started up no problems but rather curiously the cron service does not seem to be processing any jobs now. I am not sure where to go about figuring out what the problem is or how to fix it. I would greatly appreciate any help or guidance from people here on this issue. Steve www.digitalbluesky.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cron not running
You might want to use ntpd to sync the clock before cron starts if this turns out to be your problem: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network- ntp.html Once you have ntpd working, just put ntpd on the require line in the cron startup file, /etc/rc.d/cron, to ensure that cron starts up after ntpd. ...or just buy a new motherboard battery. James Riendeau MMI Computer Support Technician 1300 University Ave Rm. 436, Dept. of MedMicro Madison, WI 53706 Phone: (608) 262-3351 After-hours Phone: (608) 260-2696 Fax: (608) 262-8418 Email: [EMAIL PROTECTED] On Dec 28, 2006, at 3:33 PM, [EMAIL PROTECTED] wrote: Date: Thu, 28 Dec 2006 09:07:23 -0600 From: Derek Ragona [EMAIL PROTECTED] Subject: Re: cron not running To: steve [EMAIL PROTECTED], freebsd-questions@freebsd.org freebsd-questions@freebsd.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii; format=flowed Check the clock. Often older systems have dead batteries so the clock is so far out of whack cron jobs don't run. -Derek ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cron not running job
I'm having problems getting my freshly update FreeBSD 5.3 system to run my cron jobs. Logged in as root, I enter the job in root's crontab with the following command crontab -e I enter the job in the following format: 05 10 * * * /root/cronjobs/cvs-sup.sh The script has the following permissions: -rwxr-xr-x 1 root wheel 255 Dec 13 10:39 cvs-sup.sh I can run the script as root with no errors. I look in the /var/log/cron log and I don't see any attempt by cron to run the job. There is no error either.There are entries for the edit of the crontab: This drove me batty for a while. You should see some emails to root regarding this. Typically, it's a path issue. In your cvs-sup.sh use the full path to the binaries you are trying to execute. Like this: /usr/local/bin/cvsup /root/ports-supfile /tmp/ports-log 21 /usr/local/sbin/portsdb -Uu Also, you can use /etc/periodic/daily rather than using cron directly. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cron not running job
Andy Clements wrote: Hello All, I'm having problems getting my freshly update FreeBSD 5.3 system to run my cron jobs. Logged in as root, I enter the job in root's crontab with the following command crontab -e I enter the job in the following format: 05 10 * * * /root/cronjobs/cvs-sup.sh The script has the following permissions: -rwxr-xr-x 1 root wheel 255 Dec 13 10:39 cvs-sup.sh I can run the script as root with no errors. I look in the /var/log/cron log and I don't see any attempt by cron to run the job. There is no error either.There are entries for the edit of the crontab: Dec 14 10:03:36 bukowski crontab[632]: (root) BEGIN EDIT (root) Dec 14 10:03:45 bukowski crontab[632]: (root) REPLACE (root) Dec 14 10:03:45 bukowski crontab[632]: (root) END EDIT (root) Dec 14 11:04:00 bukowski /usr/sbin/cron[405]: (root) RELOAD (tabs/root) But nothing else. So, I'm at a lost. I have the understanding that cron should immediately recognize any changes to the file, but it doesn't seem to be working. I even re-booted in desperation. Did I forget some small tid-bit that needs to change for this to work? I've checked the Handbook, the FAQ, Google and the mailing list, but I haven't seen any solutions. Please CC me with your answer as I am not on the mailing list. Thanks in advance, Andy Clements An update. It appears that newline or carriage return must be placed at the end of the crontab line for the command to run by cron. thanks to anyone who answered anyway! --Andy ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cron not running job
On Tuesday 14 December 2004 12:20, Andy Clements wrote: Did I forget some small tid-bit that needs to change for this to work? Cron requires a newline at the end of the file. I'll bet that your crontab ends with cvs-sup.sh and not cvs-sup.shNEWLINE. -- Kirk Strauser pgpBCUQtL0uV4.pgp Description: PGP signature
cron not running job
Hello All, I'm having problems getting my freshly update FreeBSD 5.3 system to run my cron jobs. Logged in as root, I enter the job in root's crontab with the following command crontab -e I enter the job in the following format: 05 10 * * * /root/cronjobs/cvs-sup.sh The script has the following permissions: -rwxr-xr-x 1 root wheel 255 Dec 13 10:39 cvs-sup.sh I can run the script as root with no errors. I look in the /var/log/cron log and I don't see any attempt by cron to run the job. There is no error either.There are entries for the edit of the crontab: Dec 14 10:03:36 bukowski crontab[632]: (root) BEGIN EDIT (root) Dec 14 10:03:45 bukowski crontab[632]: (root) REPLACE (root) Dec 14 10:03:45 bukowski crontab[632]: (root) END EDIT (root) Dec 14 11:04:00 bukowski /usr/sbin/cron[405]: (root) RELOAD (tabs/root) But nothing else. So, I'm at a lost. I have the understanding that cron should immediately recognize any changes to the file, but it doesn't seem to be working. I even re-booted in desperation. Did I forget some small tid-bit that needs to change for this to work? I've checked the Handbook, the FAQ, Google and the mailing list, but I haven't seen any solutions. Please CC me with your answer as I am not on the mailing list. Thanks in advance, Andy Clements ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
cron not running my command?
Hey there- I am running FreeBSD 5.2.1 and I have a cron job running webalizer. The cron job seems to be running based on the log, but the data is not being updated in the directory. I do believe that I can say that the webalizer is configured correctly because if I run the command that is listed in cron by hand, the output is sent to the proper place. Here are some l0og entries and the crontab itself: europa# crontab -l 0 * * * * /etc/cron.daily/ntpdate.cron /dev/null */5 * * * * /usr/sbin/webstats europa# tail /var/log/cron Sep 20 13:25:00 europa /usr/sbin/cron[51173]: (root) CMD (/usr/libexec/atrun) Sep 20 13:26:02 europa crontab[51199]: (root) LIST (root) Sep 20 13:30:00 europa /usr/sbin/cron[51274]: (root) CMD (/usr/libexec/atrun) Sep 20 13:30:00 europa /usr/sbin/cron[51273]: (root) CMD (/usr/sbin/webstats) Sep 20 13:33:00 europa /usr/sbin/cron[51332]: (operator) CMD (/usr/libexec/save-entropy) Sep 20 13:34:35 europa crontab[51387]: (root) LIST (root) Sep 20 13:35:00 europa /usr/sbin/cron[51394]: (root) CMD (/usr/libexec/atrun) Sep 20 13:35:00 europa /usr/sbin/cron[51393]: (root) CMD (/usr/sbin/webstats) Sep 20 13:40:00 europa /usr/sbin/cron[51468]: (root) CMD (/usr/libexec/atrun) Sep 20 13:40:00 europa /usr/sbin/cron[51467]: (root) CMD (/usr/sbin/webstats) I am confused on where I should look now. Any suggestions would be appreciated. /bob ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cron not running my command?
Bob Ababurko [EMAIL PROTECTED] wrote: Hey there- I am running FreeBSD 5.2.1 and I have a cron job running webalizer. The cron job seems to be running based on the log, but the data is not being updated in the directory. I do believe that I can say that the webalizer is configured correctly because if I run the command that is listed in cron by hand, the output is sent to the proper place. Here are some l0og entries and the crontab itself: europa# crontab -l 0 * * * * /etc/cron.daily/ntpdate.cron /dev/null */5 * * * * /usr/sbin/webstats snip I am confused on where I should look now. Any suggestions would be appreciated. What is the contents of /usr/sbin/webstats? Does that script assume certain environment variables are set? Such as PATH? If so, you're better off without those assumptions. Possibly adapt /usr/sbin/webstats to output debugging info that you'll get in your email to help diagnose what's going wrong. If you're not getting email from cron when things go wrong, get your email system working properly before doing anything else. -- Bill Moran Potential Technologies http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cron not running my command?
'My' webalizer is in /usr/local/bin/ but then I use FBSD 5.1. Try with specifying where you have the configuration file ( -c path-to-config-file-and-filename). Eg. /usr/local/bin/webalizer -c /usr/local/www/conf/webalizer.conf I use it in a shell script and it works fine. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]