Solved

Script not running crontab

Posted on 2004-09-24
3
884 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LINUX backups with VEEAM 8 151
CENTOS DHCP Server / PXE/TFTP 14 203
VMware Tools Install On Linux Problem 3 101
Connect to CentOS (in a local VMWare VM) using Putty 7 140
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 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