how to create something like a sql job which has several steps in that each step executes an executa

M

mimi

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.
 
M

Marc Gravell

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
 
M

mimi

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

Marc Gravell said:
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

Hi there... I think you should implement something based on Windows
Workflow Foundation.

Best regards,


--
Angel J. Hernández M.
MCP,MCAD,MCSD,MCDBA,MCT
Microsoft MVP
http://msmvps.com/blogs/angelhernandez
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top