Crontab: overlaps

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Crontab: overlaps
# 8  
Old 11-05-2012
But it's not only the first day of the month and only Sunday. It's the first day of the month or Sunday.

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.
You will need to add some logic either to your script, or the crontab entry, to get the behaviour you are expecting.
# 9  
Old 11-05-2012
Quote:
Originally Posted by Scott
But it's not only the first day of the month and only Sunday. It's the first day of the month or Sunday.



You will need to add some logic either to your script, or the crontab entry, to get the behaviour you are expecting.
for me, the important things is avoid the overlaps...
how can i do?
# 10  
Old 11-05-2012
You can put checks like below in your script to control execution:-

Code:
WDAY=`date +"%a"`

if [ "$WDAY" = "Sun" ]
then
      exit 
fi

I hope this helps.
# 11  
Old 11-05-2012
There's various options in a similar thread here...

Take your pick.
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