I need to check the printed logs inside my cron file in ubuntu/cent os server. I am explaining my code below.
backup-mongodb.sh
#!/bin/bash
name = "uBot_sandbox"
export DATABASE_NAME="planets"
export BACKUP_LOCATION="/home/UBOT"
for container_name in $(docker ps --filter="name=$name" -q);do
echo "container name : $container_name"
done
I set this file using crontab -e
like below.
* * * * * /bin/bash /home/subhrajp/UBOT/git/uBot/python3.7-alpine3.8/app/mean-stack/node-js/utils/backup-mongodb.sh
Here I need to check the echo
output of that .sh
file once the cronjob started. Also I need to know what is the command to run the cron file manually without starting the cronjob so that I can use it while developing. Please help me to resolve my problem.