WebFaction
Community site: login faq

I've installed OSQA on my account and I'm trying to run the email notification cron job. Here's how my cron looks:

1,21,41 * * * * ~/webapps/osqa/apache2/bin/start
0 */12 * * * python2.6 ~/webapps/osqa/osqa/manage.py send_email_alerts

I've tried running just the included script like 0 */12 * * * ~/webapps/osqa/osqa/cron/send_email_alerts but I still can't get it to work. Contents of the send_email_alerts script:

#!/bin/sh
PROJECT_ROOT=/home/myusername/webapps/osqa/osqa/
/usr/local/bin/python2.6 $PROJECT_ROOT/manage.py send_email_alerts

Any idea why this isn't being triggered? Thanks!

asked 29 Mar '11, 13:42

xatrix
313
accept rate: 0%


python2.6 is not on cron's $PATH. Try using the full path, like this:

0 */12 * * * cd ~/webapps/osqa/; /usr/local/bin/python2.6 ~/webapps/osqa/osqa/manage.py send_email_alerts

Hope that helps!

permanent link

answered 29 Mar '11, 15:05

seanf
12.2k41836
accept rate: 37%

hi. i've tried with the full path, but i get

"/tmp/crontab.XXXXd8Rgfm":3: bad minute
errors in crontab file, can't install.

Which is weird because the command remains the same.

(29 Mar '11, 15:40) xatrix

Scratch that, it was an issue with Nano wrapping the words on a new line. Thanks!

(29 Mar '11, 15:44) xatrix

"Bad minute errors" has nothing to do with the command you're trying to run. It means you've got an error in the minutes part of the schedule of one of your jobs. Are you certain that you're entering the schedule correctly?

Feel free to open a support ticket if you want us to look at your crontab for you.

(29 Mar '11, 15:46) seanf
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

question asked: 29 Mar '11, 13:42

question was seen: 8,854 times

last updated: 29 Mar '11, 15:46

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