[CentOS] crontab problem

Jim Perrin jperrin at gmail.com
Sat Nov 21 14:29:23 UTC 2009


On Sat, Nov 21, 2009 at 9:10 AM, Susan Day <suzieprogrammer at gmail.com> wrote:
> Hi;
> I have the following in crontab -eu root:
> @daily /usr/local/bin/mysql-backup-
> daily.sh
> @weekly /usr/local/bin/mysql-backup-weekly.sh
> @monthly /usr/local/bin/mysql-backup-monthly.sh
>
> [root at 13gems globalsolutionsgroup.vi]# ls /usr/local/bin/mysql-*
> /usr/local/bin/mysql-daily.sh  /usr/local/bin/mysql-monthly.sh
> /usr/local/bin/mysql-weekly.sh
>
> These scripts worked on another server. The daily writes to:
> /usr/backup/database/mysql-backups/mysql-backup-dailys/
> However, a day later, nothing is there. Please advise.
> TIA,
> Suzie

There are a couple things to check in no particular order for why this
may not be working.


1. make sure that vixie-cron is installed. For minimal installation
systems, it is not installed and must be added. Files in /etc/cron.*
are not a sign that it's installed, as they are owned by another
package. rpm -q vixie-cron to be sure.

2. Check for /etc/cron.allow  or /etc/cron.deny interference. By
default there won't be any, but if someone has hardened the system
it's possible they've restricted things.

3. Cron doesn't use a full user PATH environment, so everything must
be spelled out. Check the logs to see if cron is actually running the
job and failing,  Make sure that you either define your path or that
the shell script explicitly calls everything it needs.



-- 
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell


More information about the CentOS mailing list