login community faq

I've been trying to setup cron to run wget every 15 minutes to execute a script on my site. However it never seems to actually run and I can't figure out what I'm missing:

1
*/15 * * * * /usr/bin/wget -q -O /dev/null "http://v9.forgottenexpanse.com/site/import_twitter" > ~/logs/user/cron.log 2>$1

It creates the log file on schedule, but there is nothing in it and the script isn't actually called. If I run the wget command from the command line it executes without issue.

Edit: I've also tried moving wget to a script and calling that from cron with no luck:

1
*/15 * * * * ~/webapps/fe_v9/scripts/import_twitter.sh > /dev/null 2>$1

asked Oct 26 '11 at 08:55

Curtis%20Herbert's gravatar image

Curtis Herbert
12

edited Oct 26 '11 at 09:07

Looks like removing > /dev/null 2>$1 from the tail end of the entries gets them running, although I'm still confused as to why that would break things...

(Oct 26 '11 at 09:16) Curtis Herbert Curtis%20Herbert's gravatar image

The $1 should be &1. Can you please try this instead?

1
*/15 * * * * /usr/bin/wget -q -O /dev/null "http://v9.forgottenexpanse.com/site/import_twitter" > ~/logs/user/cron.log 2>&1

answered Oct 26 '11 at 10:04

seanf's gravatar image

seanf ♦♦
55991220

Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×50
×5

Asked: Oct 26 '11 at 08:55

Seen: 1,289 times

Last updated: Oct 26 '11 at 10:04

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited