Repository navigation
Can't get crontab to work #14
|
Hi, I have followed the Raspberry pi Configuration steps but have my "solis" folder in home/pi/solis i.e. the users home folder. I can run the python script manually ok, but cannot get it scheduled via crontab. I have tried changing the path references to include pi in crontab & solis.sh but still can't get it to work and can't find any error logs. I am new to all this so can someone point me in the direction of what I am doing wrong? Thanks. |
Replies: 5 comments 3 replies
|
Can you post the output of the command: And also the contents of solis.sh And can you give a directory listing output of the following command: |
|
Can you redirect the error logging to a file, e.g. like this in the crontab: Then you maybe see the problem in the solis.errors.log file. And can you also show the full ls -l output, because then I can see if the permissions are correct. |
|
Ah, the problem is that the script solis.sh is not executable. These are mine permissions: |
|
Thanks. I must have missed that when I tried reinstalling it. I have now made the script solis.sh executable and have manually run it from the command and it's creating a log with the following error:
|
|
@mlinsell which version of Python are you running? You need at least python 3.9 or higher. Is it also possible you have python and python3 installed? |
@mlinsell which version of Python are you running?
You need at least python 3.9 or higher. Is it also possible you have python and python3 installed?
You stated that on the commandline it is working, which command did you give then? With python3 in the commandline?
If that is the case, you should adapt the solis.sh script by changing python into python3, e.g.