944,116 Members | Top Members by Rank

Ad:
Oct 26th, 2009
0

Cron job problems

Expand Post »
Hi I've set my crontab as follows :

Quote ...
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 :

Quote ...
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
Aigini is offline Offline
25 posts
since Jun 2008
Oct 26th, 2009
0
Re: Cron job problems
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.
Moderator
Staff Writer
Reputation Points: 154
Solved Threads: 18
Linux Reject
blud is offline Offline
570 posts
since Apr 2004
Oct 26th, 2009
0
Re: Cron job problems
your file name is automysqlbackup.sh.2.5
rename it from automysqlbackup.sh.2.5 to automysqlbackup.sh
i think it will work
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tracedinesh is offline Offline
11 posts
since Jun 2009
Oct 27th, 2009
0
Re: Cron job problems
Click to Expand / Collapse  Quote originally posted by Aigini ...
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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
i_tears is offline Offline
12 posts
since Oct 2009
Oct 28th, 2009
0
Re: Cron job problems
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).
Reputation Points: 14
Solved Threads: 2
Light Poster
Cronless is offline Offline
29 posts
since Sep 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Applications and Software Forum Timeline: i am not able to listen any thing on linux os
Next Thread in Linux Applications and Software Forum Timeline: Setting crontab to pull database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC