Solved

Script not running crontab

Posted on 2004-09-24
3
882 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
ID: 12145830
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
ID: 12147170
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
ID: 12161292
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

932 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

9 Experts available now in Live!

Get 1:1 Help Now