[CentOS] crontab problem

2009-11-21 Thread Susan Day
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

[r...@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
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Crontab problem

2010-10-05 Thread Jennifer Botten
Hi,

 

I seem to have a problem with crontab. I am running CentOS 5.5. If I add my
bakup scripts into crontab they take very long to run. If I run my scripts
manually they run 100%. I have also tried vixiecron, same issue. Any ideas?

 

Thanks

Jenny

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] crontab problem

2009-11-21 Thread Eero Volotinen
Susan Day 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
> 
> [r...@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.

Check that scripts are marked as executable (rx set).

--
Eero
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] crontab problem

2009-11-21 Thread Jeff
On Sat, Nov 21, 2009 at 8:10 AM, Susan Day  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
>
> [r...@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

What do you see in /var/log/cron? Is the cron daemon running? Is it
attempting to run the scripts?

Beyond that, it all depends on what tools are called from your backup
scripts. Are all the tools even installed on the new server? Are all
executable pathnames explicitly defined in the script? If not, then
maybe the cron environment is lacking some things in the PATH. You
also don't even say if the scripts work when run manually.

--
Jeff
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] crontab problem

2009-11-21 Thread Jim Perrin
On Sat, Nov 21, 2009 at 9:10 AM, Susan Day  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
>
> [r...@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
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] crontab problem

2009-11-21 Thread Susan Day
On Sat, Nov 21, 2009 at 9:26 AM, Eero Volotinen wrote:

> Check that scripts are marked as executable (rx set).
>

Thought I'd done that, but no...
Thanks,
Suzie
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] crontab problem

2009-11-21 Thread Eero Volotinen
Susan Day wrote:
> On Sat, Nov 21, 2009 at 9:26 AM, Eero Volotinen  > wrote:
> 
> Check that scripts are marked as executable (rx set).
> 
> 
> Thought I'd done that, but no...
>

Well, what happends if you run /usr/local/bin/mysql-daily.sh from 
commandline

You can also use strace or similar tools to debug scripts ..

--
Eero
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] crontab problem

2009-11-22 Thread Spiro Harvey
Susan Day  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

the above is looking for mysql-backup-[day|week|month]ly.sh

but the filenames below don't have "-backup" in their names.

> [r...@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




-- 
Spiro Harvey  Knossos Networks Ltd
021-295-1923  www.knossos.net.nz


signature.asc
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Crontab problem

2010-10-05 Thread Joost Waversveld
Hi,

Did you use full paths to your executables in your script? 

If you run an script from crontab, you could have other/missing
enviroment variables.


Best regards,

Joost

On Tue, 5 Oct 2010 10:04:18 +0200, "Jennifer Botten"
 wrote:
> Hi, 
> 
> I seem to have a problem with crontab. I am running CentOS 5.5. If I
> add my bakup scripts into crontab they take very long to run. If I run
> my scripts manually they run 100%. I have also tried vixiecron, same
> issue. Any ideas? 
> 
> Thanks 
> 
> Jenny

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Crontab problem

2010-10-05 Thread John Doe
From: Jennifer Botten 
>I seem to have a problem with crontab. I am running CentOS 5.5. If I add my 
>bakup scripts into crontab they take very long to run. If I run my scripts 
>manually they run 100%. I have also tried vixiecron, same issue. Any ideas?

Did you check if they both have the same nice level when they run?
is anything else running at the time of the cron?

JD


  
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos