Hello reader, I have a question about the following situation:
I have a perl script placed in the directory /usr/bin/, full path = /usr/bin/script10
to envoke it in shell i type:
Code:
Nick@ubuntu:~$ script10
to envoke it from python i use:
Code:
>>> import os
>>> os.system(script10)
My intend was to run a python script every minute in cron that countains the lines:
Code:
import os
os.system(script10)
this script worked perfectly from my terminal session, and ran without errors using cron, except for 1 thing, it did not execute "script10", after hours of debugging the script finding for other things that could have caused it to malfunction i came to the conclusion that i need to use the FULL path of the executable...
my question is WHY do these things work normally in terminal sessions (where you can read the output nicely) and won't work when you use them with cron (making it harder to tell where it went wrong...)
can someone give me the full history on this, because i feel i'm missing out on something here.
Bookmarks