Link to home
Start Free TrialLog in
Avatar of DipehKhakhkhar
DipehKhakhkhar

asked on

Script not running crontab

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
ASKER CERTIFIED SOLUTION
Avatar of blkline
blkline

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of willy134
willy134

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


Avatar of DipehKhakhkhar

ASKER

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!