WebFaction
Community site: login faq

Hi, I have a custom application port and i need to use in tornado application.

when I manually start the server by "python2.7 server.py" it is working.

In webfaction server i tried by adding below lines in cron tab

python2.7 path_to_pyscript.py.

but it is not working. How to achieve this

How to add that to the cron file ??

asked 31 Aug '15, 19:41

Vivek91may1
135
accept rate: 0%


Use the full path to python2.7,

/usr/local/bin/python2.7
permanent link

answered 31 Aug '15, 21:38

johns
5.3k312
accept rate: 23%

Thanks for the quick reply .. I tried with /webapps/prjname/lib/python2.7 /path/to/script.py

and it is still not working .. however, how the python folder runs the script ?

(01 Sep '15, 18:49) Vivek91may1

/webapps/prjname/lib/python2.7 is not the correct path for the python2.7 executable.

The correct path is, as @johns mentioned, /usr/local/bin/python2.7.

So, in your crontab, use:

/usr/local/bin/python2.7 $HOME/path/to/script.py
(01 Sep '15, 19:45) seanf

It works !! Thanks for the help !!

(03 Sep '15, 14:32) Vivek91may1
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:

×97
×52
×11

question asked: 31 Aug '15, 19:41

question was seen: 1,995 times

last updated: 03 Sep '15, 14:32

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