Solved

Script not running crontab

Posted on 2004-09-24
3
881 Views
Last Modified: 2013-12-16
Hi,

I have added four lines in the existing crontab file under
/etc
directory.

But the script is not running on the specified time. I am able to run the script directly mentioning the same path which i gave in the crontab file.

Here is the text of my crontab file.

=========================================================================================


SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=drricher@psych.syr.edu
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

# runs DatabaseBackup Script
01 7 * * * /root/DBBackUp7AM.sh
40 12 * * * /root/DBBackUp12Noon.sh
01 17 * * * /root/DBBackUp5PM.sh
01 22 * * * /root/DBBackUp10PM.sh



=========================================================================================

Any help to solve this problem will be highly appreciated.

Thanks!
Cheers!
Dipesh
0
Comment
Question by:DipehKhakhkhar
3 Comments
 
LVL 6

Accepted Solution

by:
blkline earned 50 total points
Comment Utility
If you are running this via the system crontab /etc/crontab then you need to give it a user, thus:

01 7 * * * root /root/DBBackUp7AM.sh

Barry
0
 
LVL 5

Expert Comment

by:willy134
Comment Utility
you can create a -user- crontab just by typing in crontab -e
then paste your lines in just like you have them


0
 
LVL 1

Author Comment

by:DipehKhakhkhar
Comment Utility
Hi Barry,

Thanks for replying and answering my query.

Your solution worked for me. Thanks a ton.

I tired doing crontab -e under spool directory but it did not work for me.

Thanks  once again !
Cheers!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now