On Sun, May 19, 2013 at 4:43 AM, Vincent Vande Vyvre
wrote:
> Le 18/05/2013 19:59, Chris Angelico a écrit :
>
>> On Sun, May 19, 2013 at 3:35 AM, woooee wrote:
>>>
>>> The obvious question, do you have the shebang on the first line so the
>>> OS knows it's to be run as a Python program?
>>
>> Tha
Le 18/05/2013 19:59, Chris Angelico a écrit :
On Sun, May 19, 2013 at 3:35 AM, woooee wrote:
The obvious question, do you have the shebang on the first line so the
OS knows it's to be run as a Python program?
That won't make any difference; the cron job specifically stipulates
the interpreter.
On Sun, May 19, 2013 at 3:35 AM, woooee wrote:
> The obvious question, do you have the shebang on the first line so the
> OS knows it's to be run as a Python program?
That won't make any difference; the cron job specifically stipulates
the interpreter. It just needs to be done with a full path.
The obvious question, do you have the shebang on the first line so the
OS knows it's to be run as a Python program? Also I would change
tryJson() to
if __name__ == "__main__':
tryJson()
This probably won't make any difference but you will have the bases
covered.
--
http://mail.python.org/mai
On 5/18/2013 6:12 AM, Avnesh Shakya wrote:
hi,
i want to run python script which generating data into json fromat, I am
using crontab, but it's not executing...
my python code--
try.py --
import json
import simplejson as json
import sys
def tryJson():
saved = sys.stdout
correctF
Message original
Sujet: Re: python script is not running
Date : Sat, 18 May 2013 12:36:55 +0200
De :Vincent Vande Vyvre
Pour : Avnesh Shakya
Le 18/05/2013 12:12, Avnesh Shakya a écrit :
hi,
i want to run python script which generating data into json fromat
In article ,
Chris Angelico wrote:
> On Sat, May 18, 2013 at 8:12 PM, Avnesh Shakya wrote:
> > avin@hp:~$ crontab -e
> > then type -
> > */2 * * * * python /home/avin/data/try.py
> >
>
> You may need to put an explicit path to your Python interpreter. Type:
>
> $ which python
>
> and put tha
On Sat, May 18, 2013 at 8:12 PM, Avnesh Shakya wrote:
> avin@hp:~$ crontab -e
> then type -
> */2 * * * * python /home/avin/data/try.py
>
You may need to put an explicit path to your Python interpreter. Type:
$ which python
and put that into your crontab.
ChrisA
--
http://mail.python.org/mail
make sure data.json is absolute path
make sure you test it directly without crontab
in the crontab, execute the script in such way, python scripty > /tmp/log 2>&1
check the log
发自我的小米手机
Avnesh Shakya 编写:
>hi,
>i want to run python script which generating data into json fromat, I am
> u