1

[ubuntu] Cron job isn't working

view story
linux-howto

http://ubuntuforums.org – I have an sh file called m.sh with the contents: Code: echo "Cleaning memory"sync; echo 3 > /proc/sys/vm/drop_cachesecho ""free -mecho ""ps cax | grep java > /dev/nullif [ $? -eq 0 ]; then  echo "== Server is already running =="else  sh a.sh  echo "========== STARTING THE SERVER =========="fi When I run it with Code: sh m.sh it works perfectly. But I need it to run every 5 minutes, so I am using cron jobs. It needs to work as root/sudo so I did Code: sudo -s , then Code: crontab -e and wrote this i (Hardware)