November 17, 2009 at 11:41 pm
Hi,
I want to schedule an executable using a SQL Server 2008 Job,
but the executable may run for a period of three hours +-
Will the SQL Job Timeout before it completes? or will the Job run until the executable finishes?
thanks
November 18, 2009 at 12:08 am
Hi,
Can you explain in brif what kind of excutable is that?
Rd,
Deepali
November 18, 2009 at 2:06 am
Hi
The executable is kind of like a 'poller'
it will call a WCF service repeatedly (using a timer with about 10 second intervals - at least) until all records that it has to be processed has been done.
1. It will set a global variable working = true
2. it will start a timer with +- 10 second intervals
3. it will start a loop that sleeps for one second at a time,
this loop will continue until the working variable has been set to false.
4. the timer event will:
4.1 disable the timer
4.2 call a wcf service to get the count of outstanding records (to be processed)
4.3 call a wcf service (one way) to start a process
4.4 enable the timer
(note that at this time the WCF service will be processing a large number
of records)
5. next time timer event is fired it will again:
5.1 check how many records are outstanding by calling a WCF service
5.2 if records returned = 0 it will set a working bool var. to false
5.3 it will call the one way process again if it finds that the service has stopped for whatever reason - an internal static variable in the WCF service will determine whether the WCF service is still running the function or not.
if the timer event is completed the main loop will break if the working variable is false resulting in the executable stopping and hopefully the SQL Job will now also stop successfully and the next sql job in the chain created in sql sentry can continue.
note that this whole process will happen 3 times.
since the executable will be called three times - probably in three separate jobs or 3 steps within the same job with a different command line argument everytime, but it will do the same thing. as explained above.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply