python3 working on terminal but not on cron job

56 Views Asked by At

My python code is working fine but I am not able to run by using cron.

The cron setup I have tried:

*/2 * * * * python3 /var/folder1/filename.py >>> /var/folder1/cronlog/cron.log 2>&1

Error:

Traceback (most recent call last):
  File "/var/folder1/fileNAme.py", line 23, in <module>
    netsuite_connection = pyodbc.connect(netsuite_connection_string, autocommit=True)
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/netsuite/odbcclient/lib64/ivoa27.so' : file not found (0) (SQLDriverConnect)")
0

There are 0 best solutions below