N
N
Nikolay Baranenko2018-05-11 19:10:33
Task Schedulers
Nikolay Baranenko, 2018-05-11 19:10:33

Why doesn't Job work?

Hello.
Created a job in crontab as root

# job 
1 19 * * * /opt/project1/start.sh

in the
tail /var/log/cron log, I
believe the Job was sent for execution
May 11 19:01:01 server01 CROND[127428]: (root) CMD (/opt/project1/start.sh)

As a result, a notification should come to the mail, BUT it did not come.
If you run /opt/project1/start.sh on the forehead, then everything works out.
What could be the problem and how to solve it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
enabl3, 2018-05-11
@drno-reg

I ran into a similar problem and solved it like this:
cd /opt/project1/ && ./start.sh

N
Nikolay Baranenko, 2018-05-12
@drno-reg

decided like this
/data/Anaconda2-4.4.0/envs/python36/bin/python opt/project1/Table_Control.py opt/project1/connection.yaml
BUT I still don't understand why the same script is interpreted differently if to run it from the shell, then there is no problem, but if through cron, then some other environment is selected ....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question