Go to advanced search

by niespielak
Wed Aug 27, 2014 2:34 pm
Forum: Raspberry Pi OS
Topic: Cron and Python3 script
Replies: 16
Views: 6924

Re: Cron and Python3 script

The same situation was with crone - i used to modify "crontab -e" by nano with mac os formating. Cron don't even start with bad conf file. Now is everything ok - thx all You Guys for help!
by niespielak
Mon Aug 25, 2014 8:17 am
Forum: Raspberry Pi OS
Topic: Cron and Python3 script
Replies: 16
Views: 6924

Re: Cron and Python3 script

I used a "dos2unix Termometr.py" on the file which was formated by nano dos format. Everything is ok now - script working after usin g "./Termometr.py".

Now I will check Cron.
by niespielak
Mon Aug 25, 2014 8:04 am
Forum: Raspberry Pi OS
Topic: Cron and Python3 script
Replies: 16
Views: 6924

Re: Cron and Python3 script

I used nano as editor and format file to mac standard.
by niespielak
Mon Aug 25, 2014 7:38 am
Forum: Raspberry Pi OS
Topic: Cron and Python3 script
Replies: 16
Views: 6924

Re: Cron and Python3 script

Rpdom i get this readout: head -1 Termometr.py | hexdump -C 00000000 23 21 2f 75 73 72 2f 62 69 6e 2f 70 79 74 68 6f |#!/usr/bin/pytho| 00000010 6e 33 0d 70 72 69 6e 74 28 22 54 65 73 74 22 29 |n3.print("Test")| 00000020 0d 69 6d 70 6f 72 74 20 6f 73 0d 69 6d 70 6f 72 |.import os.impor| I have probl...
by niespielak
Sun Aug 24, 2014 5:48 pm
Forum: Raspberry Pi OS
Topic: Cron and Python3 script
Replies: 16
Views: 6924

Re: Cron and Python3 script

Other thing I find out that: 1. When I try to modificate shebang in my python script Termometr.py to this one: "#!/usr/bin/python3" and after that start script "./Termometr.py" i get info that import is impossible becouse bad interpreter. 2. I check out with "which python3" and there is simlink "/us...
by niespielak
Sun Aug 24, 2014 4:35 pm
Forum: Raspberry Pi OS
Topic: Cron and Python3 script
Replies: 16
Views: 6924

Re: Cron and Python3 script

1. In auth.log i get info that cron sometimes (not reguraly minute by minute): "Aug 24 10:17:01 raspberrypi CRON[5563]: pam_unix(cron:session): session opened for user root by (uid=0) Aug 24 10:17:01 raspberrypi CRON[5563]: pam_unix(cron:session): session closed for user root" 2. I add print stateme...
by niespielak
Sun Aug 24, 2014 3:30 pm
Forum: Raspberry Pi OS
Topic: Cron and Python3 script
Replies: 16
Views: 6924

Re: Cron and Python3 script

Rpdom thx for reply. I put Your code to cron, but as I wrote last post - cron is not starting the script. There is nothing to log in ">>/tmp/Termometr.log 2>>/tmp/Termometr.err". I repeat the question - there is any debug/log for corn - example script paths are wrong, user dont have rights etc. to r...
by niespielak
Sun Aug 24, 2014 10:58 am
Forum: Raspberry Pi OS
Topic: Cron and Python3 script
Replies: 16
Views: 6924

Cron and Python3 script

Hello Guys, a few days ago i wrote post in this link: Python3 script doesn't finish ( http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=85136&p=601891#p601891 ) - in few words if I use command in bash: "usr/bin/python3 /home/pi/programs/Termometr.py" - everything is ok, but when i Try use: "./T...
by niespielak
Fri Aug 22, 2014 10:13 pm
Forum: Troubleshooting
Topic: Python3 script doesn't finish
Replies: 4
Views: 922

Re: Python3 script doesn't finish

Yep i know that :) I check out that in path and python3 is good in my statement.
by niespielak
Fri Aug 22, 2014 10:03 pm
Forum: Troubleshooting
Topic: Python3 script doesn't finish
Replies: 4
Views: 922

Re: Python3 script doesn't finish

I think there in not any execution of the python script - it isn't start anyway! I put print as You said in the first line after the script header "#! /usr/bin/env python3" and there is no answer on the bash screen. I think problem is connected with bash excecutin of python script. As I mention in f...
by niespielak
Fri Aug 22, 2014 11:43 am
Forum: Troubleshooting
Topic: Python3 script doesn't finish
Replies: 4
Views: 922

Python3 script doesn't finish

Hello Everyone, I made script to record temperature readout into mysql database. If I use simple command: "Python3 Temperatura.py" everything is ok - script finish and I have record in database, but when I try to use: "./Temepratura" or "sudo ./Temperatura" script starts and is still working - I hav...

Go to advanced search