LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Crontab not running script (https://www.linuxquestions.org/questions/linux-newbie-8/crontab-not-running-script-851441/)

j8177e5 12-20-2010 03:45 PM

Crontab not running script
 
I'm trying to get myself familiar with bash scripting. I created a script to delete all files and folders in a specific directory, and made an entry in crontab. Crontab will not run the script, but I can run it manually. Any ideas?

contab entry:

50 11 * * * /home/backupadmin/test_script.sh

Script:

#!/bin/bash

#++
# This script is ONLY a test
#--

cd /backup_fs2/copy_backup_fs1/
rm -rf MNG0*

Tinkster 12-20-2010 04:40 PM

Hi, welcome to LQ!

What do the logs say, is your user getting mail regarding this?
We could aid you with better guesses/questions if you mentioned
the distribution you're using.



Cheers,
Tink

j8177e5 12-21-2010 08:54 AM

Sorry about that. The distro CentOS 5.

I actually figured it out after you mentioned looking at the logs in your post. I looked at /var/log/cron and didn't see any of my test cron jobs running. Decided to do ps ax | grep cron and saw that crond wasn't running. Started crond and everything seems to be running now.

Thanks for the help!


All times are GMT -5. The time now is 05:22 PM.