Traceback (most recent call last):
File "/home/user1/UDE/scripts/UdeManager.py", line 12, in ?
import UdeUtilService
File "/home/user1/UDE/scripts/UdeUtilService.py", line 164
output = dict((str(k), [i[1] for i in outlst if i[0] == k]) for k in frozenset(j[0] for j in outlst))
^
SyntaxError: invalid syntax
If that file is not in /home/user1 it is not going to be found.
First reaction is to specify the full path.
However because it works for user1 I would find out why it works, then compare the environment of the user to that of cron for that user.
Try comparing the output of "set" at the command prompt to the same command when run from a one-off cron. Particular attention to PYTHONPATH and more.
In the end you will probably need a shell wrapper to set enough environment variables to give Python the right environment.
Issue:Python script was working fine from command line not from crontab
Reason: Environment variables are not set in cron
#Redirect the environment variables of the user to a file.
$env > /home/user1/.env_file
$vi /home/user1/.env_file
#type "export" each variable mentioned over there.
export HOME LD_LIBRARYPATH
$vi myscript.sh
#Add the following line
source ~/.env_file
-------------
#script details
--------------