Issue
I am trying to set up some cronjobs on Ubuntu for daily tasks. To do so I added for example the line
25 11 * * * ~/test_script.sh
to the sudo crontab -e
table. In the test_script.sh
I am trying a simple echo to a log file like this:
#!/bin/bash
# file: test_script
echo "Test" >> ~/test.log
When I run the script normally a line with "Test" is added to test.log
. However at 11:25 nothing seems to happen. I already checked if the time is set correctly using echo $(date)
.
What am I missing here?
Solution
you should paste the full path of script. For example 25 11 * * * /home/xxxx/test_script.sh
Answered By - Senior Pomidor