Solved

Script not running crontab

Posted on 2004-09-24
3
885 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
digital ocean web console access ? does it use port 22 4 113
rsyslog raw message 4 61
regular expression help for sed command 5 63
Bash script to include windows servers 13 41
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

751 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