See my shell script:
#!/bin/bash
eval "$(conda shell.bash hook)"
conda activate myenvironment
cd /home/user/myproject/
python main.py
If I call it with bash being logged in as user, it works. But then I try calling it with this cronjob:
01 03 * * * /home/user/myproject/run.sh
It gives me this error:
/home/user/myproject/run.sh: line 2: conda: command not found
/home/user/myproject/run.sh: line 3: conda: command not found
/home/user/myproject/run.sh: line 5: python: command not found
Other relevant output from the cronjob:
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/user>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=user>
How can I fix this?