Koozali.org: home of the SME Server

Cron Jobs (for Ted Hobson)

Rob Hillis

Cron Jobs (for Ted Hobson)
« on: October 04, 2001, 07:52:46 PM »
Forgive me for starting a new topic on this one, but for some reason, there was no web link on your original message, making replying quite difficult...

Original message....

> Hoping for a little guidance. I want to set up a cron job to fetch
> content for my web site. Specifically I want to get slashdot.xml
> everyday from www.slashdot.org I'm using
> wget http://www.slashdot.org/slashdot.xml -O
/path/to/primary/web-site/directory/slashdot.xml
> to get the file. When I execute this command manually, it works fine.
> However, I managed to get /etc/crontab to look like

[...]

00 20 * * * wget http://www.slashdot.org/slashdot.xml -O /home/e-smith/files/primary/html/myprojects/xml/slashdot.xml

[...]
> through a custom template, but it doesn't work! I'm assuming this is
> meant to be run everyday at 8:00 pm.

You're missing the user name to run the cron job as.  try the following line instead...

00 20 * * * root wget http://www.slashdot.org/slashdot.xml -O /home/e-smith/files/primary/html/myprojects/xml/slashdot.xml

It would be better to find a user with less privilages than root to run this job as, though. (anyone care to make a suggestion?)

Rob Hillis

Re: Cron Jobs (for Ted Hobson)
« Reply #1 on: October 04, 2001, 08:52:05 PM »
>Hey, thanks very much Rob. Big help. Yeah, can you tell the newbianness of me?

Hey, we all had to start somewhere... :-)

> I'm not sure what the deal was the link you were talking about. I just sent
> that email to phorum_general@lists.e-smith.org. Should I have done something
> different?

I'm not sure how phorum works, but as far as I'm aware, you need to use the web interface to the group so that your messages show up in all stored parts of the phorum. (Somone from Mitel, please feel free to correct me)

If you look at the top of this message, it will have something like "This message was sent from: General discussion.  http://forums.contribs.org/index.php?topic=2573.msg8697#msg8697"  This link is the access point for this topic to the web interface.  That's usually where you compile replies to phorum messages.

Ted Hobson

Re: Cron Jobs (for Ted Hobson)
« Reply #2 on: October 04, 2001, 08:58:11 PM »
Hey, works like a charm!

I guess its true that you learn something new everyday