LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-20-2010, 03:45 PM   #1
j8177e5
LQ Newbie
 
Registered: Dec 2010
Posts: 3

Rep: Reputation: 0
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*
 
Old 12-20-2010, 04:40 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 12-21-2010, 08:54 AM   #3
j8177e5
LQ Newbie
 
Registered: Dec 2010
Posts: 3

Original Poster
Rep: Reputation: 0
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Crontab Script Not Running th1bill Ubuntu 4 12-10-2010 03:49 PM
crontab not running script sunlinux Linux - Newbie 5 05-18-2010 06:21 AM
Shell Script not Running from Crontab venkatramanj Suse/Novell 3 01-13-2010 05:15 AM
Running a script with crontab. glore2002 Slackware 3 06-05-2008 08:48 PM
error running script on crontab haora Linux - Newbie 3 03-11-2005 04:02 PM


All times are GMT -5. The time now is 06:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration