On Mon, Jun 13, 2011 at 12:52 PM, Kurt Buff <kurt.b...@gmail.com> 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=`/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?

#!/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-unsubscr...@freebsd.org"

Reply via email to