It is necessary to run the bash script with cron from under the current user, but it is not executed when cron is running. I was looking at similar topics on the Internet, and I was unable to find out the reason. Please help me find the root of the problem.
admin@user-desktop:~$ crontab -e
SHELL=/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin
* * * * * sh /usr/bin/local/send_my_ip.sh >/dev/null 2>&1
May 15 20:31:01 user-desktop CRON[408639]: (admin) CMD (sh /usr/bin/local/send_my_ip.sh >/dev/null 2>&1)
May 15 20:37:01 user-desktop CRON[408805]: (admin) CMD (/bin/bash /usr/bin/local/send_my_ip.sh >/dev/null 2>&1)
May 15 20:38:01 user-desktop CRON[408841]: (admin) CMD (/bin/bash /usr/bin/local/send_my_ip.sh >/dev/null 2>&1)
admin@user-desktop:~$ ls -l /usr/local/bin/send_my_ip.sh
-rwxrwxrwx 1 admin admin 569 may 15 20:27 /usr/local/bin/send_my_ip.sh
#!/bin/bash
. ~/.bashrc
MY_IP=$(wget -qO- eth0.me)
MY_IP_LAST=$(cat ~/my_ip.txt)
echo "$MY_IP" >> /home/admin/log_cron.log
don't work Shell script not running via crontab, but runs fine manually