Hey guys I'm really new to linux and still learning so hopefully this will be an easy one for you guys.
I'm trying to learn more about how to use cron to schedule events on my ubuntu machine. Right now I have a script (script.sh) that is as follows:
#!/bin/bash
echo "I work"
I log into terminal as root (sudo -i) and am entering:
sudo bash /home/lskidson/tests/script.sh
It properly executes the script when I do this. (Still logged on as root) I have a crontab set up to execute this script every minute that I can not get to work it is as follows (I set it up using crontab -e)
* * * * * sudo bash /home/lskidson/tests/script.sh
I write it to the file then when I print the job list (crontab -l) it appears properly as I have asked it to. However, the script never runs.
Do you guys have any general tips as to what could be wrong? I can provide more info if needed. Thanks in advance!