N
N
Nikolay Baranenko2018-05-12 16:26:56
bash
Nikolay Baranenko, 2018-05-12 16:26:56

How to properly debug and understand why the commands do not work?

Hello.
There is a problem when running job
1 19 * * * /opt/project1/start.sh
in cron.
Job fires BUT commands do not fire

source activate python36
python /opt/project1/Table_Control.py opt/project1/connection.yaml

#!/bin/bash
#clear
#echo "Good morning, world."
source activate python36
python /opt/project1/Table_Control.py opt/project1/connection.yaml

I want to understand what is wrong in the script.
tried to write the output line by line to a file
#!/bin/bash
#clear
#echo "Good morning, world."
source activate python36 > step1.txt
python /opt/project1/Table_Control.py opt/project1/connection.yaml > step2.txt

step1.txt and step2.txt appeared BUT they were empty.
How to properly debug and understand why the commands do not work
source activate python36
python /opt/projectl1/Table_Control.py opt/project1/connection.yam

?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Fedoseev, 2018-05-12
@martin74ua

source filename [arguments]
Read and execute commands from filename in the current shell
environment and return the exit status of the last command
executed from filename.
Do you need to run this command?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question