From owner-freebsd-questions@FreeBSD.ORG Mon Jun 13 21:46:09 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 C9A8F106566B for ; Mon, 13 Jun 2011 21:46:09 +0000 (UTC) (envelope-from kurt.buff@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 54BF68FC14 for ; Mon, 13 Jun 2011 21:46:08 +0000 (UTC) Received: by wwc33 with SMTP id 33so5177204wwc.31 for ; Mon, 13 Jun 2011 14:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=R3r4sEcdKyzi6y6Pikm8aQqUeWFRInUjkVOh+r/tai4=; b=DU9zP9V7Xa7E30cYLzLDlxq1/pVBqIZt/0cjSGlxqfXLfEgRsMwQ/pW4oijawcXxc7 cwiYeyaHoFHObTxyynhFjE26A7QKzm2atrjrtwIYrq3Fntknh0/WfmdETppz8C770Dqg sNoj9RR5wne8Gbtp5KmUBekAu5b8i8Mq5xMOE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=D7JpGYp+mhUA1jvTu/RFJQ8VXh87eKzD912vJw+YwiBvkoKI/mu4ObUmjFI5wtbjOm d21Q2dRruaPIIfOAi3/d50iLLqPtRlaFoeigFPFGYqQQjPtrhR8OtOCf4lSZJPNCw5Il oT7RACv8fKa6qceXhAHottlYq60HM5jUmDrX0= MIME-Version: 1.0 Received: by 10.216.46.21 with SMTP id q21mr3040616web.113.1308001568042; Mon, 13 Jun 2011 14:46:08 -0700 (PDT) Received: by 10.216.46.7 with HTTP; Mon, 13 Jun 2011 14:46:07 -0700 (PDT) In-Reply-To: <17591_1307999699_4DF67DD3_17591_66_1_D9B37353831173459FDAA836D3B43499BF89C4E8@WADPMBXV0.waddell.com> References: <17591_1307999699_4DF67DD3_17591_66_1_D9B37353831173459FDAA836D3B43499BF89C4E8@WADPMBXV0.waddell.com> Date: Mon, 13 Jun 2011 14:46:07 -0700 Message-ID: From: Kurt Buff To: FreeBSD Questions Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: 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:46:10 -0000 Indeed. Brain fade comes with age - and long weekends with the 2 year old b= oy... Kurt On Mon, Jun 13, 2011 at 14:14, Gary Gatten wrote: > Yeah Pete, kinda need that huh. =C2=A0Kurt, If that turns out to be the o= nly issue, don't feel bad - I've forgotten it myself several times! =C2=A0I= 'm sure many others have as well! > > G > > > -----Original Message----- > From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions= @freebsd.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 * * * =C2=A0 =C2=A0 =C2=A0 =C2=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 /= root. >> >> 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 > > > > -- > 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.o= rg" > > > > > > >
>
> "This email is intended to be reviewed by only the intended recipient > =C2=A0and may contain information that is privileged and/or confidential. > =C2=A0If you are not the intended recipient, you are hereby notified that > =C2=A0any review, use, dissemination, disclosure or copying of this email > =C2=A0and its attachments, if any, is strictly prohibited. =C2=A0If you h= ave > =C2=A0received this email in error, please immediately notify the sender = by > =C2=A0return email and delete this email from your system." >
> >