I have several jobs running on a task scheduler. Those jobs have to run in
order. My problem is that if job 1 fails, job 2 doesn't know.
I don't want to bundle those jobs into 1 program because often we run them
separately as needed.
I would like to do create a program like a sql server job which contains
several steps. Each step will execute a window job as describe above. If
step1 succeed, step 2 will run, otherwise, it quits.
Has anyone had experiences with it. Thanks in advance.
Angel J. Hernández M. - 29 Jun 2007 00:58 GMT
Hi there... I think you should implement something based on Windows
Workflow Foundation.
Best regards,

Signature
Angel J. Hernández M.
MCP,MCAD,MCSD,MCDBA,MCT
Microsoft MVP
http://msmvps.com/blogs/angelhernandez
angeljesus14@hotmail.com
>I have several jobs running on a task scheduler. Those jobs have to run in
>order. My problem is that if job 1 fails, job 2 doesn't know.
[quoted text clipped - 7 lines]
>
> Has anyone had experiences with it. Thanks in advance.
Marc Gravell - 29 Jun 2007 05:24 GMT
You could do that simply in a batch file, checking the error-level
(exit code) after each?
Or likewise using Process.Start / .WaitForExit / .ExitCode if you want
to get more complex...
I'm pretty certain that google will yield a range of freeware (else
cheap) products that allow you to designate a few commands (and
arguments) to invoke, breaking on exit. *Branching* on exit is more
complex, but still easy to do (but harder to generalise into a wrapper
UI...)
Marc
mimi - 29 Jun 2007 15:08 GMT
Thanks all, I haven't heard Windows Workflow foundation, I will googgle to
see what it is about..
Batch file probably is the easiest way to approack
thank again
> You could do that simply in a batch file, checking the error-level
> (exit code) after each?
[quoted text clipped - 9 lines]
>
> Marc
Hi there... I think you should implement something based on Windows
Workflow Foundation.
Best regards,

Signature
Angel J. Hernández M.
MCP,MCAD,MCSD,MCDBA,MCT
Microsoft MVP
http://msmvps.com/blogs/angelhernandez
angeljesus14@hotmail.com