Scheduling of a Job
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 57
- Joined: Fri Feb 24, 2006 7:44 am
Scheduling of a Job
i want to schedule a job every third and last friday of each month,we are only using datastage director to schedule jobs . Is there a way to run the jobs accordingly? Any ideas Please!
Thanks
Raj
Thanks
Raj
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The answer is no.
Every Friday 13th schedules every Friday and every 13th.
There's no way to identify the last Friday of a month with the Director scheduling interface; some months have four Fridays, some have five.
Every Friday 13th schedules every Friday and every 13th.
There's no way to identify the last Friday of a month with the Director scheduling interface; some months have four Fridays, some have five.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Charter Member
- Posts: 57
- Joined: Fri Feb 24, 2006 7:44 am
Scheduling of a Job
Can i do it with in a sequencer by using a wait for file activity or a execute command stage , but if i use the execute command then i should know when exactly is the last friday of the month from unix dynamically .
and trigger the job every friday and the execute command should check wether its last friday or not of the month ,if ti satisfies that should trigger my job.
But can anyone help me in the unix command or to create a file on that day dynamically.
Thanks
Raj
and trigger the job every friday and the execute command should check wether its last friday or not of the month ,if ti satisfies that should trigger my job.
But can anyone help me in the unix command or to create a file on that day dynamically.
Thanks
Raj
You can build a routine to take a date as one of three inputs and then check to see if it is the "Xth Y" of that month. We built one that will generically handle any occurance of any day name... however, didn't set it up for 'Last' - just 1st Monday, 2nd Friday, etc.
We then run a Sequence every day where that is the first activty, downstream activity is only triggered when the routine returns 'true'.
We then run a Sequence every day where that is the first activty, downstream activity is only triggered when the routine returns 'true'.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Charter Member
- Posts: 57
- Joined: Fri Feb 24, 2006 7:44 am
Scheduling of a Job
Guys,
Finally i thoought of creating a file in unix and check for file every friday and this files will be only created on third friday and last friday with different names and chekinig these files my jobs will get triggered .
I am doing this by altering my crontab file and creating these files.
code:
10 15 ? * 6#3 cat /clocal/srvr2159/dump01/db2temp_process_2/spdwinput/crun.txt > /clocal/srvr2159/dump01/db2temp_process_2/spdwoutput/frun.txt
for third friday
But i am getting an error saying
0481-079 Reached a symbol that is not expected
Can anyone please correct me so that this can work.
Thanks
Raj.
Finally i thoought of creating a file in unix and check for file every friday and this files will be only created on third friday and last friday with different names and chekinig these files my jobs will get triggered .
I am doing this by altering my crontab file and creating these files.
code:
10 15 ? * 6#3 cat /clocal/srvr2159/dump01/db2temp_process_2/spdwinput/crun.txt > /clocal/srvr2159/dump01/db2temp_process_2/spdwoutput/frun.txt
for third friday
But i am getting an error saying
0481-079 Reached a symbol that is not expected
Can anyone please correct me so that this can work.
Thanks
Raj.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Here's what i found on google.
http://post.doit.wisc.edu/library/techl ... rr0481.htm
Scroll down for the error code.
http://post.doit.wisc.edu/library/techl ... rr0481.htm
Scroll down for the error code.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
6#3 is meant to represent the third occurance of the 6th day of the week - i.e. the third Saturday of the month. FYI, Friday is the day 5 of a week, while Sunday is the '0th' day.
However, it's not standard syntax from what I've seen. I believe that only specialized implementations of cron allow syntax like that, plus fun stuff like 'L' for 'Last', 'W' for 'closest Weekday' etc. Where did you find this, your man pages?
However, it's not standard syntax from what I've seen. I believe that only specialized implementations of cron allow syntax like that, plus fun stuff like 'L' for 'Last', 'W' for 'closest Weekday' etc. Where did you find this, your man pages?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Charter Member
- Posts: 57
- Joined: Fri Feb 24, 2006 7:44 am
Scheduling of a Job
This entry should create a dummy file every third friday at 10:15 am.
But i am not sure of this part ? * 6#3 ,it doesn't like the # symbol or something.I got this code by browsing google unix forums.Please explain
Thanks
Raj
But i am not sure of this part ? * 6#3 ,it doesn't like the # symbol or something.I got this code by browsing google unix forums.Please explain
Thanks
Raj
-
- Premium Member
- Posts: 503
- Joined: Wed Jun 29, 2005 8:14 am
Well there is one complex way that it can be done if you really want to do it --
1. Write a routine which will find out the last day of the friday. (Find out what is the last day and date in the month and subtract a number from it to reach the last friday).
2. Design a job and call this routine in it. Schedule this job to run each friday and if the friday's date matches with the date u stored in the step 1 then trigger the required job.
What do u think guys???
1. Write a routine which will find out the last day of the friday. (Find out what is the last day and date in the month and subtract a number from it to reach the last friday).
2. Design a job and call this routine in it. Schedule this job to run each friday and if the friday's date matches with the date u stored in the step 1 then trigger the required job.
What do u think guys???
Obviously, it's not supported syntax on your platform. Talk to an SA, ask them how you can shedule something to run on the third Friday of any given month.
Or use your Enterprise Scheduler if you have one - Control-M for example. Or write that routine!
ps. Already been suggested, Deepak.
Or use your Enterprise Scheduler if you have one - Control-M for example. Or write that routine!
ps. Already been suggested, Deepak.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Charter Member
- Posts: 57
- Joined: Fri Feb 24, 2006 7:44 am
Scheduling of a Job
Thanks guys , I will have to start working on that routine as craig mentioned earlier.Yes My Crontab is not supporting the 6#3 .I got this by browsing google.
I will work on that routine and let you all know
Thanks
Rajesh
I will work on that routine and let you all know
Thanks
Rajesh
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: