0

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?

5
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Cronless
0

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.

0

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

0

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).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.