davidw88
asked on
Crontab question: can not invoke Python script
Hi experts,
I have two Python scripts "A" and "B". In "A" I use "os.system(...)" to invoke script "B". If I manually run "A", then "B" can be invoked successfully. However, when I use crontab to execute "A", "B" does not run in this case.
Anybody knows how to fix this?
Thanks so much.
I have two Python scripts "A" and "B". In "A" I use "os.system(...)" to invoke script "B". If I manually run "A", then "B" can be invoked successfully. However, when I use crontab to execute "A", "B" does not run in this case.
Anybody knows how to fix this?
Thanks so much.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It does not work.
I just combined the two scripts into one script. This solved the problem.
Thanks cxr for your reply. Appreciated.
I just combined the two scripts into one script. This solved the problem.
Thanks cxr for your reply. Appreciated.
ASKER
thanks for your reply. I used
command = ("python %s") % (B.py)
os.system(command)
Following your suggestion I have added full path to the python executabe. so let's wait and see how it works.