WebFaction
Community site: login 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:

*/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:

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

asked 26 Oct '11, 08:55

Curtis Herbert
112
accept rate: 0%

edited 26 Oct '11, 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...

(26 Oct '11, 09:16) Curtis Herbert

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

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

answered 26 Oct '11, 10:04

seanf
12.2k41836
accept rate: 37%

Your answer
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

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×81
×7

question asked: 26 Oct '11, 08:55

question was seen: 3,653 times

last updated: 26 Oct '11, 10:04

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM