From owner-freebsd-questions@FreeBSD.ORG Thu Nov 3 21:36:05 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79E9816A41F for ; Thu, 3 Nov 2005 21:36:05 +0000 (GMT) (envelope-from nvidican@wmptl.com) Received: from wmptl.net (fw1.wmptl.com [216.8.159.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id E919243D48 for ; Thu, 3 Nov 2005 21:36:04 +0000 (GMT) (envelope-from nvidican@wmptl.com) Received: from [10.0.0.104] (r3140ca.wmptl.net [10.0.0.104]) by wmptl.net (8.13.1/8.13.1) with ESMTP id jA3La3ae087042; Thu, 3 Nov 2005 16:36:03 -0500 (EST) (envelope-from nvidican@wmptl.com) Message-ID: <436A82C3.9000708@wmptl.com> Date: Thu, 03 Nov 2005 16:36:03 -0500 From: Nathan Vidican User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brandon Hinesley References: <001201c5e0bb$6c81a8b0$6800a8c0@BrandonH> In-Reply-To: <001201c5e0bb$6c81a8b0$6800a8c0@BrandonH> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.111 () RATWR10_MESSID X-Scanned-By: MIMEDefang 2.44 Cc: questions@freebsd.org Subject: Re: Cron Job will not run. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 21:36:05 -0000 lol - sorry to point out the obvious, but ya never know ;) - have seen worse/done worse myself... Anyhow, try modifying the script so it just outputs something to the console, see if cron logs/emails the output or not, then take it step-by-step from there; have it actually print out/echo the command(s) your script will run, then you can verify the command works on the console, then go from there. I have a (rather complex) backup script using rsync, written in Perl (yeah, I know I could have done what I did using shell or a cleaner setup - just Perl is easier ;) I synchronize serveral directories to effectively mirror a partition accross two data servers (/server, from server1 to server2). Here's my script for what it may be worth: #!/usr/bin/perl -w use strict; use lib '/server/modules'; my $verbose = defined($ARGV[0]); # pairs go: /server/{src/key} = /server/{dst/value} # eg: 'profiles' => '' = /server/profiles (remote) to /server (local) my %dirs = ( 'profiles'=>'', 'common'=>'', 'msword'=>'', 'qs9000'=>'', 'quattro'=>'', 'exe'=>'', 'users'=>'', 'netlogon'=>'' ); open(LOG,">/var/log/rsync_nightly.log") || die "Couldn't create log file!\n"; foreach my $src (keys %dirs) { my $output = `/usr/local/bin/rsync -va --stats --delete rsync://server2/server/$src /server/$dirs{$src}`; print LOG $output; print $output if ($verbose); } close(LOG); exit; -- Nathan Vidican nvidican@wmptl.com Windsor Match Plate & Tool Ltd. http://www.wmptl.com/ Brandon Hinesley wrote: > If it's not, then someone's inserting things into my /var/log/cron! > > >>Here's some of /var/log/cron: >>-------------------- >>Nov 3 09:00:00 server /usr/sbin/cron[56343]: (operator) CMD >>(/usr/libexec/save-entropy) Nov 3 09:00:00 server /usr/sbin/cron[56344]: >>(root) CMD (/usr/libexec/atrun) Nov 3 09:00:00 server >>/usr/sbin/cron[56345]: (root) CMD (/usr/local/Backup/scripts/bkup-daily) > > > Kidding...yes it's running: > root@server# ps ax | grep cron > 472 ?? Is 0:02.20 /usr/sbin/cron -s > 57450 p0 R+ 0:00.00 grep cron > > Thanks > > -----Original Message----- > From: Nathan Vidican [mailto:nvidican@wmptl.com] > Sent: Thursday, November 03, 2005 1:07 PM > To: Brandon Hinesley > Cc: questions@freebsd.org > Subject: Re: Cron Job will not run. > > May be a really dumb question here, but like all technical problems, start > with > the simple stuff: > > ps ax | grep cron ???? > > Is cron even running? >