I have a requirement, to pass Fridays date to my job. Here im using ESP scheduler to run the job, but ESP can only pass the date on which it is running. It passes saturday date if it runs on sturday. I can schedule my job on friday so that it can pass firday date, but if for some reason job run on saturday or sunday my job will give unproper results. So could you guys plz help me in finding fridays date in Unix wrapper script itself.
Thanks in advance for all.
---------- Post updated at 01:13 PM ---------- Previous update was at 01:11 PM ----------
Quote:
Originally Posted by vgersh99
Thanks for quick reply.
what exactly it will give me...?
Let me make my question clear.
My job need to run on weekly basis on every friday.
If for some reason job runs on saturday or sunday or monday or anyday, then also i need previous friday date in the wrapper script. I would like to hold that date in a varibale (parameter). Please explain me how you above function would work for my requiremnt.
sorry, I misunderstood what you'd wanted.
The above when put in a script will exit the script if the script gets run on any day other than Friday (the 5-th day of the week).
I believe this solves one part your question....
Ya.., that's right. But my requirement is not to skip the job if it is saturday or sunday.
My req is to to run the job with Fridays date, even it's running on saturday or sunday.
Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below.
Could you please help out to achieve solution through shell script..
File content:
... (2 Replies)
Hi all,
Need an urgent help on the below scenario.
script:
awk -F","
'BEGIN { #some variable assignment}
{ #some calculation and put values in array}
END {
year=#getting it from array and assume this will be 2014
month=#getting it from array and this will be 05
date=#... (7 Replies)
Hi All,
what i want to do in perl is i should give the date at run time .Suppose date given is 23/12/2011(mm/dd/yyyy) the perl script shold find week start date, week end date, previous week start date,end date,next week start date, end date. In this case
week start date will be-:12/19/2011... (2 Replies)
Hi,
I tried to find the solution on the forum without success.
datecalc from Perderabo doesn't solve my problem.
I would like to know how to do the same thing that date +%U but for a specific date.
For example:
2011 08 27
=> 39
Thinks a lot (8 Replies)
Hi all,
I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date.
So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
Hi,
How to get last week date ?
Normally i use this command :
But somehow this not working in SunOS
And i try use this :
But in SunOS only working only get last 6 days
Cheers, (1 Reply)