Call job each 30 minutes
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Call job each 30 minutes
I need to make a job that should be called each 30 minutes.
I'm thinking to make a "job batch" and make a loop to call it each 30 minutes, does anyone has any suggestion?
Regards,
Fernando
I'm thinking to make a "job batch" and make a loop to call it each 30 minutes, does anyone has any suggestion?
Regards,
Fernando
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Then you just need a smarter sleeper. I wasn't going to add all the gory details, just put forth the general (very) high level concept.
As an example, I just built one that needs to run over the course of the day and run a series of jobs 'every five minutes'. At the end of each run, regardless of runtime, it sleeps until the next 5 minute mark on the clock. Generally it comes in well under that, but if it does run over then the next 5 minute mark on the clock is the sleep target.
As an example, I just built one that needs to run over the course of the day and run a series of jobs 'every five minutes'. At the end of each run, regardless of runtime, it sleeps until the next 5 minute mark on the clock. Generally it comes in well under that, but if it does run over then the next 5 minute mark on the clock is the sleep target.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Quite.
Create a routine. Use the fact that the SLEEP statement has two syntaxes - one that sleeps for a given number of seconds, the other that sleeps until a particular clock time. Being in a routine, it is easy to calculate the next 30 minute point.
Create a routine. Use the fact that the SLEEP statement has two syntaxes - one that sleeps for a given number of seconds, the other that sleeps until a particular clock time. Being in a routine, it is easy to calculate the next 30 minute point.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, we do. I'm interested in Ray's statement re: two syntaxes... I see no evidence of the ability of being able to sleep until a particular clock time. Where would that be documented?
I went thru some gyrations to compute the next time to sleep to and how many seconds from now that was, hence the interest.
I went thru some gyrations to compute the next time to sleep to and how many seconds from now that was, hence the interest.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
SLEEP hh:mm
Not documented in DataStage BASIC manual.
Been around since the early days of UniVerse, but not documented in UniVerse BASIC manual either.
One of those undocumented features no-one seems to have a list of.
Not documented in DataStage BASIC manual.
Been around since the early days of UniVerse, but not documented in UniVerse BASIC manual either.
One of those undocumented features no-one seems to have a list of.
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.
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
more information:
- I don't have a external scheduling tool like Contol-M
- The job do not spend more than 2 minutes
How the question here is very urgent, than I make a "job batch" and put in a for and a sleep. After I will change this!
But the "SLEPP 00:30" doesn't work here, well I have the version 7.5.2.
Regards,
Fernando
- I don't have a external scheduling tool like Contol-M
- The job do not spend more than 2 minutes
How the question here is very urgent, than I make a "job batch" and put in a for and a sleep. After I will change this!
But the "SLEPP 00:30" doesn't work here, well I have the version 7.5.2.
Regards,
Fernando
I think the two sleep syntaxes that Ray is referring to is Sleep n where n is the number of seconds and the other one that he mentioned. But i am not sure about the syntax of SLEEP HH:MM. I am trying to test it but no matter what i put in HH or MM , for some reasons it just sleeps for that amount of seconds.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
As for fmartinsferreira, you can use
to sleep for 30 minutes.
Code: Select all
SLEEP 1800
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Thats work, but I was trying "SLEPP 00:30" too like Ray talked.DSguru2B wrote:As for fmartinsferreira, you can useto sleep for 30 minutes.Code: Select all
SLEEP 1800