Cron job problems

Reply

Join Date: Jun 2008
Posts: 25
Reputation: Aigini is an unknown quantity at this point 
Solved Threads: 0
Aigini Aigini is offline Offline
Light Poster

Cron job problems

 
0
  #1
Oct 26th, 2009
Hi I've set my crontab as follows :

30 17 * * * sh /bin/automysqlbackup.sh.2.5
The script I'm using to function as a cron job is a database backup script, which is automysqlbackup .So by right my daily backups should be at 5.30 p.m in the evenings.

But I noticed that my database does not backup on Saturdays. It backs up on Sundays, but not Saturdays.
There is another default crontab scipt in the /etc directory :

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
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
Does this play a part in not creating a backup on Saturdays?

I do not know why this should affect the backing up because I've not placed the automysqlbackup script in the cron.daily directory.

Why does the database not backup on Saturdays at all, but does backup on Sundays at 5.30 p.m?
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 511
Reputation: blud will become famous soon enough blud will become famous soon enough 
Solved Threads: 17
Moderator
Staff Writer
blud blud is offline Offline
Linux Reject
 
0
  #2
Oct 26th, 2009
Your first cron should run at 5:30 *every* day, the first thing I would check is /var/log/cron and make sure that the cron task is actually running. One limitation might be if you have "access times" configured for your user account, since cron will need to execute as that user.
--
<Something clever here>
RHCDS/MCP/DCSP
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 11
Reputation: tracedinesh is an unknown quantity at this point 
Solved Threads: 0
tracedinesh's Avatar
tracedinesh tracedinesh is offline Offline
Newbie Poster
 
0
  #3
Oct 26th, 2009
your file name is automysqlbackup.sh.2.5
rename it from automysqlbackup.sh.2.5 to automysqlbackup.sh
i think it will work
Dinesh  Maurya
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: i_tears is an unknown quantity at this point 
Solved Threads: 0
i_tears i_tears is offline Offline
Newbie Poster
 
0
  #4
Oct 27th, 2009
Originally Posted by Aigini View Post
Hi I've set my crontab as follows :



The script I'm using to function as a cron job is a database backup script, which is automysqlbackup .So by right my daily backups should be at 5.30 p.m in the evenings.

But I noticed that my database does not backup on Saturdays. It backs up on Sundays, but not Saturdays.
There is another default crontab scipt in the /etc directory :



Does this play a part in not creating a backup on Saturdays?

I do not know why this should affect the backing up because I've not placed the automysqlbackup script in the cron.daily directory.

Why does the database not backup on Saturdays at all, but does backup on Sundays at 5.30 p.m?
Hi....

1) tracedinesh is right first of all change your file name and make that executable. Then you don't need to mention sh in the crontab.

2) Try to list down crontab entries other then root user e.g (crontab -l -u <username>)

3) Check your system date/time
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 26
Reputation: Cronless is an unknown quantity at this point 
Solved Threads: 2
Cronless Cronless is offline Offline
Light Poster
 
0
  #5
Oct 28th, 2009
Might also help to dump the output of each cron run to a log file in case it is running, but giving you an error by appending "> /tmp/crondaily.out" (one for each).
~~ Free Cron Jobs - Online Cron Service ~~
Best place to run your PHP Cron Jobs
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



Tag cloud for *nix Software
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC