From owner-freebsd-questions@FreeBSD.ORG Mon Jun 13 20:22:55 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 3C3F7106566B for ; Mon, 13 Jun 2011 20:22:55 +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 C1AE88FC08 for ; Mon, 13 Jun 2011 20:22:54 +0000 (UTC) Received: by wwc33 with SMTP id 33so5113450wwc.31 for ; Mon, 13 Jun 2011 13:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=FM/C+F82gTKX1rMMqCOEpzx/BBvbCIabcf7vISnW8XU=; b=VUjqcywuhBM7ORsCw4zMo2f3pLd4zQpwfnIcX7F/n4Tr77gIkvDd9uIFR+K35hDh7S Ge5B6GXMooBqUaDupI+L96h7tpaccU/ePmtYZOkCJsWcNiLElQ3F76ZVmjH7ARXPkPET SwqD7QFAU+r/bWgXvigyb7kI8RHD+UAXB4n/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=RWP0qPxUs7KlTE26wIx5UT8i49iFCK+W7k0bfZKEtNhxUHiKuYCbcLi0oKMUfetKA8 eimW1e6qYghu7jw1HpwySojApMbepTFZv8gIzZZli/TaB2wac4thIxTeL0xx8oRPpxVB R6MkHRrwf6//MxW8vvWE8RWz2C66NG0BoVYVI= MIME-Version: 1.0 Received: by 10.216.46.21 with SMTP id q21mr2953162web.113.1307994732020; Mon, 13 Jun 2011 12:52:12 -0700 (PDT) Received: by 10.216.46.7 with HTTP; Mon, 13 Jun 2011 12:52:11 -0700 (PDT) Date: Mon, 13 Jun 2011 12:52:11 -0700 Message-ID: From: Kurt Buff To: FreeBSD Questions Content-Type: text/plain; charset=UTF-8 Cc: Subject: 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 20:22:55 -0000 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=`/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 * * * /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? Kurt