Crontab: overlaps

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Crontab: overlaps
# 1  
Old 11-05-2012
Crontab: overlaps

I'm using CentOS 6.3 and I use a crontab entries like this:

Code:
0 23 2-31 * 1-6 root weekdayscript
0 23 1 * 7 root weekendscript

this 2 entries always overlaps... but I don't know how... Smilie

thanks
# 2  
Old 11-05-2012
The job will run when either of the criteria match, not when all of them do.

Quote:
Note: The day of a command's execution can be specified by two fields: day of month, and day of week.

If both fields are restricted (ie, aren't *), the command will be run when either field matches the current time.
# 3  
Old 11-05-2012
Quote:
Originally Posted by Scott
The job will run when either of the criteria match, not when all of them do.
so it's right or wrong???

sorry... but I just can't understand...

the weekdayscript could not run saturday and sunday... instead it does...
the same thing the weekendscript... I don't understand why they overlaps...

Last edited by ionral; 11-05-2012 at 05:44 AM..
# 4  
Old 11-05-2012
weekdayscript will be run every day except the 1st of a month if the latter fall on a Sunday. Unlikely to be what you expect.

Last edited by jlliagre; 11-05-2012 at 06:20 AM..
# 5  
Old 11-05-2012
sorry but I'm getting stupid ...
weekdayscript should start any day of the month except for the first and every day except for sunday.

weekendscript should start every first day of the month and only Sunday

is so or not??
# 6  
Old 11-05-2012
No. Weekdayscript will run Monday through Saturday (1-6) or any day of the month except the first day (2-31), unless the first day is Monday through Saturday (1-6)

Weekend script will run on the first day of the month (1) or Sunday (7).
# 7  
Old 11-05-2012
Quote:
Originally Posted by Scott
No. Weekdayscript will run Monday through Saturday (1-6) or any day of the month except the first day (2-31), unless the first day is Monday through Saturday (1-6)

Weekend script will run on the first day of the month (1) or Sunday (7).
ok, but in my case it's not true... What am I doing wrong?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Base64 conversion in awk overlaps

hi, problem: output is not consistent as expected using external command in AWK description: I'm trying to convert $2 into a base64 string for later decoding, and for this when I use awk , I'm getting overlapped results , or say it results are not 100% correct. my code is: gawk... (9 Replies)
Discussion started by: busyboy
9 Replies

2. UNIX for Dummies Questions & Answers

Crontab

Can crontab be removed from an AIX system. We had a script that was running on the system. It stopped working. An outside vendor said that crontab does not exist on the system. and that is why it is not running. How can i verify this and get it back on the systems if needed? thanks (4 Replies)
Discussion started by: fierfek
4 Replies

3. Shell Programming and Scripting

Crontab help

Hi I am trying to create a cron job but i get an error I have 2 files my main shell script with html which is genWebsite.sh and another called config.sh which hold variables that I pass to genWebsite.sh by using the line ./source config.sh. I want a cron job to refresh a html generated... (14 Replies)
Discussion started by: scriptnewbie
14 Replies

4. Solaris

Partition overlaps another partition while creating new parition in solaris

hi all while formatting hard disk i am getting following error. Partition 1 ends at 266338338 It must be between 34 and 143374704. label error: EFI Labels do not support overlapping partitions Partition 8 overlaps partition 1. Warning: error writing EFI. Label failed. I have formatted the... (2 Replies)
Discussion started by: nikhil kasar
2 Replies

5. Shell Programming and Scripting

awk? create similarity matrix by calculating overlaps between sets comprising of individual parts

Hi everyone I am very new at awk and to me the task I need to get done is very very challenging... Nevertheless, after admiring how fast and elegant issues are being solved here I am sure this is my best chance. I have a 2D data file (input file is a plain tab-delimited text file). The first... (1 Reply)
Discussion started by: stonemonkey
1 Replies

6. Linux

Need help with Crontab

Im setting up crontab to run a command at 0800 my current crontab entry is: 0 8 * * 1,2,3,4,5 tcpdump -s2000 -w'flowroute-%H%M.pcap' -G900 -W34 This should start the script at 800am monday through friday as i understand it. I have tested this a couple times and it does not start as... (6 Replies)
Discussion started by: Nasasdge
6 Replies

7. Shell Programming and Scripting

Determining number of overlaps between two files using Hashes?

Hi there, I have a doubt about how to set this up. This is the situation. I have two files, one that is ~31,000 in length and has the following information (7 fields): file1 1 + 100208127 100261594 6 100208127,100231680,100237404,100245177,100249508,100260529, ... (35 Replies)
Discussion started by: labrazil
35 Replies

8. Solaris

help with Crontab

Hello, I have a Sun server and I want to edit the Crontab file. When I type "crontab -l" it lists the jobs scheduled. When I type "crontab -e" I get "767" And nothing comes up nor does anything seem to break this. I am running with "root" user and the screen is small enough. What is this... (2 Replies)
Discussion started by: bbbngowc
2 Replies

9. AIX

crontab

Hi, am able to run manual backup on a client by going to /usr/tivoli/tsm/client/ba/bin and running dsmc incr command. am running incremental backup. my question was 1) suppose i want to run automated backup , should i put it in crontab and how to do that? should i open crontab using crontab -e... (4 Replies)
Discussion started by: karthikosu
4 Replies

10. UNIX for Dummies Questions & Answers

crontab

Hi All, Can any one please help in setting up crontab where the crontab entries are in a file say "crontabentries" How to delete the crontab entries and how to register a file to crontab. thanks Satish (1 Reply)
Discussion started by: thaduka
1 Replies
Login or Register to Ask a Question