about automatically run python code
Posted: Fri Sep 08, 2023 3:44 am
I have a python code that can run SBC4 with SSH, but I upload to SBC with SBC4 web, and make it run automatically, but it does not work, and give the errors:
/usr/userapps/python/removeOldMiniseed.py: 7: /usr/userapps/python/removeOldMiniseed.py:
Created on Thu Jul 6 22:13:14 2023
@author: cuijw
: not found
/usr/userapps/python/removeOldMiniseed.py: 9: /usr/userapps/python/removeOldMiniseed.py: import: not found
/usr/userapps/python/removeOldMiniseed.py: 10: /usr/userapps/python/removeOldMiniseed.py: import: not found
from: can't read /var/mail/threading
/usr/userapps/python/removeOldMiniseed.py: 13: /usr/userapps/python/removeOldMiniseed.py: Syntax error: "(" unexpected
I add #!/usr/userapps/python/ in the code head , then I get error: /etc/webif/init.d/S20python: 41: /etc/webif/init.d/S20python: /usr/userapps/python/removeOldMiniseed.py: Permission denied
How should I do?
/usr/userapps/python/removeOldMiniseed.py: 7: /usr/userapps/python/removeOldMiniseed.py:
Created on Thu Jul 6 22:13:14 2023
@author: cuijw
: not found
/usr/userapps/python/removeOldMiniseed.py: 9: /usr/userapps/python/removeOldMiniseed.py: import: not found
/usr/userapps/python/removeOldMiniseed.py: 10: /usr/userapps/python/removeOldMiniseed.py: import: not found
from: can't read /var/mail/threading
/usr/userapps/python/removeOldMiniseed.py: 13: /usr/userapps/python/removeOldMiniseed.py: Syntax error: "(" unexpected
I add #!/usr/userapps/python/ in the code head , then I get error: /etc/webif/init.d/S20python: 41: /etc/webif/init.d/S20python: /usr/userapps/python/removeOldMiniseed.py: Permission denied
How should I do?