I have a Bash script running on Ubuntu, it works well when I execute it using the bash
command
bash join_tables.sh
Inside the .sh file I've put
#!/bin/bashsource activate agra_envcd /root/jupyterpython3 test_2.pyconda deactivate
The .sh
file is in the root directory itself
I tried to do a system wide cronjob and I used this line of code
*/5 * * * * root bash join_tables.sh
This is the output I am getting
Apr 29 08:35:01 ubuntu-s-2vcpu-4gb-amd-nyc3-01 CRON[613616]: (root) CMD ( bash join_tables.sh)Apr 29 08:35:01 ubuntu-s-2vcpu-4gb-amd-nyc3-01 CRON[613615]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)Apr 29 08:35:01 ubuntu-s-2vcpu-4gb-amd-nyc3-01 CRON[613617]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)Apr 29 08:35:01 ubuntu-s-2vcpu-4gb-amd-nyc3-01 CRON[613615]: pam_unix(cron:session): session closed for user root
So how do I make sure cron executes the bash file?