From owner-freebsd-questions@FreeBSD.ORG Mon Jun 13 21:15:00 2011 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A931106564A for ; Mon, 13 Jun 2011 21:15:00 +0000 (UTC) (envelope-from Ggatten@waddell.com) Received: from mailhost1.waddell.com (mailhost1.waddell.com [67.130.252.46]) by mx1.freebsd.org (Postfix) with ESMTP id 34B588FC14 for ; Mon, 13 Jun 2011 21:14:59 +0000 (UTC) Received: from emlpfilt2.waddell.com (emlpfilt2.waddell.com [10.1.10.30]) by mailhost1.waddell.com (Postfix) with ESMTP id 76BEE50DB6; Mon, 13 Jun 2011 16:14:59 -0500 (CDT) Received: from emlpfilt2.waddell.com (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 694C72F8003; Mon, 13 Jun 2011 16:14:59 -0500 (CDT) Received: from WADPHTCAS0.waddell.com (wadphtcas0.waddell.com [192.168.203.229]) by emlpfilt2.waddell.com (Postfix) with ESMTP id 619EB2F8002; Mon, 13 Jun 2011 16:14:59 -0500 (CDT) Received: from WADPMBXV0.waddell.com ([169.254.1.163]) by WADPHTCAS0.waddell.com ([192.168.203.229]) with mapi; Mon, 13 Jun 2011 16:14:59 -0500 From: Gary Gatten To: 'pete wright' , Kurt Buff Date: Mon, 13 Jun 2011 16:14:58 -0500 Thread-Topic: Probably working too hard for this cron question Thread-Index: AcwqDHKeijE64oiHThKG9oal7LamHQAAk26g Message-ID: <17591_1307999699_4DF67DD3_17591_66_1_D9B37353831173459FDAA836D3B43499BF89C4E8@WADPMBXV0.waddell.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: FreeBSD Questions Subject: RE: Probably working too hard for this cron question 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: Mon, 13 Jun 2011 21:15:00 -0000 Yeah Pete, kinda need that huh. Kurt, If that turns out to be the only iss= ue, don't feel bad - I've forgotten it myself several times! I'm sure many= others have as well! G -----Original Message----- From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@f= reebsd.org] On Behalf Of pete wright Sent: Monday, June 13, 2011 3:25 PM To: Kurt Buff Cc: FreeBSD Questions Subject: Re: Probably working too hard for this cron question On Mon, Jun 13, 2011 at 12:52 PM, Kurt Buff wrote: > All, > > I've googled a bunch, read some freebsd.org docs, and just can't > figure this out. > > I have a script that should read the current date into a variable, > append the time/date stamp at the beginning of the file created with > the date in the variable, do a bunch of cURL stuff, then append a > time/date stamp at the end of the file. > > It works if I run it manually, but not from cron. > > Here are the batchfile and the cron entry: > > ----------begin script---------- > dt=3D`/bin/date "+%Y-%m-%d"` > /bin/date > /root/$dt-external1.txt > /usr/local/bin/curl -K /root/urls.txt >> /root/$dt-external1.txt > /bin/date >> /root/$dt-external1.txt > ----------end script---------- > > ----------begin crontab---------- > 15 12 * * * =A0 =A0 =A0 =A0/root/do-curl.sh > ----------end crontab---------- > > I'm doing all of this as root, as you can see. > > The job launches - I can see an entry for cURL in top - but no file in /r= oot. > > I've tried several variations on the first line of the script, but I'm > getting nowhere, though I'm sure it's something stupidly simple that > I'm missing. > > What am I missing? #!/bin/sh ? -pete --=20 pete wright www.nycbug.org _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
"This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system."