11-08-2011
Running Script via Crontab on 2nd Working day each month
Hello Guys,
I have a questions regarding running a shell script every second working day each month.
I have no clue how solve this problem
.
Important is that it has to be the second working (Mo-Fr).
Example: If 1st and 2nd Days of month are Sat and Sun the script must run on 4th day of month (2n working day) which is Thuesday.
Thanks for your help!
Kind Regards
David
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies
2. Shell Programming and Scripting
Hi
I need a script to get "Last working day of the month". I will pass the month and year as parameters and i need to get the last working date.
Ex
for June 2008 the last working day is 30th its monday.
for August 2008 the last working day is 29th and it is Friday.
ie the last working... (6 Replies)
Discussion started by: manmarirama
6 Replies
3. Shell Programming and Scripting
Hi,
I want a script(ksh) to see if today is the last working day(Mon-Fri) of the month. If it is the last working day I need to print current date, else I need the last working day of previous month. Thanks in advance. (1 Reply)
Discussion started by: rspk_praveen
1 Replies
4. UNIX for Dummies Questions & Answers
I know I can't schedule this in cron and would have to write a wrapper around my script and schedule it in cron ....but not sure how do to this?
How do I exclude Monday if the 2nd day of the month falls on a Monday?
Thanks.
I tried this:
0 0 2 * 0,2-6 command
And I know this doesnt... (2 Replies)
Discussion started by: newtou
2 Replies
5. Shell Programming and Scripting
i've created a script which should run every last day of the month. what would be the exact crontab entry for this? thanks! (9 Replies)
Discussion started by: tads98
9 Replies
6. Shell Programming and Scripting
Hi,
How to find the first working day of month ?
My requirement is, I need to call the function only if today is first working day of month. I could find out one function which finds last working day in month in this forum. Can anyone pls let me know for first working day. Thanks.
for... (10 Replies)
Discussion started by: vnimavat
10 Replies
7. Shell Programming and Scripting
Hello All,
I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer.
Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies
8. Shell Programming and Scripting
Hello Experts/Guru,
I need a help in running the script on every month last day....
PS: due to some constrain I can't schedule in crontab
Requirement:
On Jan 31st i want to run some script, similarly on Feb 28th, March 31st, April 30th......till Dec 31st.
Please help me by providing... (3 Replies)
Discussion started by: aks_1902
3 Replies
9. Shell Programming and Scripting
Hi,
I would like to calculate 1st working/Business day of each month.
Exp:
1st -Oct-2011 is Saturday--- Non Business Day
So the Next Working Day would be 3-Oct-2011
I need a shell script to calculate the month first business date. (3 Replies)
Discussion started by: koti_rama
3 Replies
10. Shell Programming and Scripting
The following bash command line works for the last day of the month. Test by replacing the 1 with tomorrows day of month number
&& echo "Day before tomorrow"Can it be used within crontab? As
* * 28-31 * * && echo "Today ls last day of month" >>/tmp/crontabtestI tried to test crontab with... (1 Reply)
Discussion started by: lsatenstein
1 Replies
LEARN ABOUT X11R4
holidays
holidays(4) File Formats holidays(4)
NAME
holidays - prime/nonprime table for the accounting system
SYNOPSIS
/etc/acct/holidays
DESCRIPTION
The /etc/acct/holidays file describes which hours are considered prime time and which days are holidays. Holidays and weekends are con-
sidered non-prime time hours. /etc/acct/holidays is used by the accounting system.
All lines beginning with an "*" are comments.
The /etc/acct/holidays file consists of two sections. The first non-comment line defines the current year and the start time of prime and
non-prime time hours, in the form:
current_year prime_start non_prime_start
The remaining non-comment lines define the holidays in the form:
month/day company_holiday
Of these two fields, only the month/day is actually used by the accounting system programs.
The /etc/acct/holidays file must be updated each year.
EXAMPLES
Example 1: Example of the /etc/acct/holidays file.
The following is an example of the /etc/acct/holidays file:
* Prime/Nonprime Table for the accounting system
*
* Curr Prime Non-Prime
* Year Start Start
*
1991 0830 1800
*
* only the first column (month/day) is significant.
*
* month/day Company Holiday
*
1/1 New Years Day
5/30 Memorial Day
7/4 Indep. Day
9/5 Labor Day
11/24 Thanksgiving Day
11/25 day after Thanksgiving
12/25 Christmas
12/26 day after Christmas
SEE ALSO
acct(1M)
SunOS 5.10 28 Mar 1991 holidays(4)