Why is the cronjob below not working? As manually executed script is working, but if I put it on cron job it doesn't push through.
#--------Reports-------------
25 11 * * * /logs/scripts/chim/currbalance_dump.sh >> /logs/currbal.log
script is below
#!/bin/bash
sftp [email protected] << SFTP
cd /home/sftpadm/BanKo/CurrBalance/
mget banko_current_balance_`date +%Y%m%d`.csv /logs/Reports/BanKo/CurrBalance
SFTP
exit
Folder is
/logs/scripts/chim/currbalance_dump.sh
-rwxrwxrwx 1 kycadm kycadm 174 Sep 29 09:43 currbalance_dump.sh
mget
and where is it installed (type mget
)mget
but try to give the absolute path formget
2>&1
at the end of the cron (after>> /logs/currbal.log
), now the log should tell you where it is failing.