I'm calling a shell script that calls a shell script from crontab and it will not run.
Please throw me a bone. The script is called every minute to test it.
crontab -e
*/1 * * * * /bin/bash -l /home/cwc/bash/pingall.sh
note:
/home/cwc/bash/pingall.sh
runs fine from cli
code for pingall.sh
NOW=$(date +"%Y-%m-%d-%T");
LOGFILE="PING-$NOW.txt";
touch $LOGFILE;
/home/cwc/bash/ping.sh >> $LOGFILE;
code for ping.sh
for ip in $(seq 1 5);
do
ping 192.168.1.$ip -c3;
done
Thanks.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
crontab to .sh will not run.
Re: crontab to .sh will not run.
removing the touch seemed to help.
NOW=$(date +"%Y-%m-%d-%s");
LOGFILE="log-$NOW.txt";
/home/cwc/bash/ping.sh >> /home/cwc/bash/$LOGFILE;
this was only tested on gentoo
NOW=$(date +"%Y-%m-%d-%s");
LOGFILE="log-$NOW.txt";
/home/cwc/bash/ping.sh >> /home/cwc/bash/$LOGFILE;
this was only tested on gentoo