LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-17-2008, 07:19 AM   #1
Mischa
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Rep: Reputation: 0
Crontab changed?


I've successfully been running a crontab script to backup virtual machines on our VMware ESX servers for a while now.
But recently we've upgraded from ESX 3.02 to the new 3.5 version.
I've copied the content of my crontab to the new machines, but now it doesn't seem to work anymore.

What it should do:
I want to run 8 different scripts.
Every saturday where the day of the month is 1,2,3,4,5,6 or 7 I want to run a script at 8:59 and another at 10:59

The following script did that for me, but since I've upgraded, the script seems to run every day!

Is something changed in a new version of crontab?
Is there a solution for this problem?

Code:
# Maandelijkse backups
59 8 1-7 * 6 /usr/local/bin/vmbk.pl -C /root/Scripts/maandelijks/maand1_za1.conf > /dev/null 2>&1
59 10 1-7 * 6 /usr/local/bin/vmbk.pl -C /root/Scripts/maandelijks/maand1_za2.conf > /dev/null 2>&1
59 8 8-14 * 6 /usr/local/bin/vmbk.pl -C /root/Scripts/maandelijks/maand2_za1.conf > /dev/null 2>&1
59 10 8-14 * 6 /usr/local/bin/vmbk.pl -C /root/Scripts/maandelijks/maand2_za2.conf > /dev/null 2>&1
59 8 15-21 * 6 /usr/local/bin/vmbk.pl -C /root/Scripts/maandelijks/maand3_za1.conf > /dev/null 2>&1
59 10 15-21 * 6 /usr/local/bin/vmbk.pl -C /root/Scripts/maandelijks/maand3_za2.conf > /dev/null 2>&1
59 8 22-27 * 6 /usr/local/bin/vmbk.pl -C /root/Scripts/maandelijks/maand4_za1.conf > /dev/null 2>&1
59 10 22-27 * 6 /usr/local/bin/vmbk.pl -C /root/Scripts/maandelijks/maand4_za2.conf > /dev/null 2>&1
 
Old 09-17-2008, 09:07 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Have you seen this: http://www.adminschoice.com/docs/cro...Crontab%20file
Anyway, the first 2 entries you've got do what you want. The rest extend that to every Saturday, for every day of the mth up to 27th, which is not what you say you want.
 
Old 09-18-2008, 02:19 AM   #3
Mischa
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
Have you seen this: http://www.adminschoice.com/docs/cro...Crontab%20file
Anyway, the first 2 entries you've got do what you want. The rest extend that to every Saturday, for every day of the mth up to 27th, which is not what you say you want.
Oh, sorry!
I want to run two other scripts the 8th until the 15th.
Two others 16th - 21th every month and the last two the 22th - 29th
every month.
All of them only on saturdays.

I've seen how the crontab should work, but the scripts seem to run every day (when the day of the month is in between the set limit) instead of only on saturdays.

Any other suggestions.
 
Old 09-18-2008, 02:44 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, I'd start by commenting out all of those except one eg first, so we can narrow down the possibilities.
Then double check the files created etc to ensure that it really is happening every day. eg just before its due to run, start top in an xterm and watch it. Its entirely possible its being run by another crontab.
I'd also change the names of the progs, at the moment you've got the same prog in every entry.
You might even need to read the perl prog to see what its doing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 04:03 PM
crontab rana_abdulwahid Linux - Newbie 3 01-25-2008 09:14 AM
Installed Ubuntu but it changed my boot loader. I want this changed... mdorries Linux - Distributions 8 05-31-2007 08:13 PM
crontab ALF Linux - Software 4 12-18-2003 11:10 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration