How to check status of scheduled job

D

das

Hi all,
I have 2 jobs running windows apps (C#) scheduled on windows
scheduler. There is a dependency with this, the second job cannot start
until the first job finishes running.

Both the jobs run the same app but with different parameters. Please
give me some ideas on how to do this, whether there is something that I
can check from within my code to see if the first one ended...

FYI: I have a very tight window, so I cannot have whatever times I want
to run the second job and ususally its hard to predict the time it
takes for the first job to finish.

thanks much.
 
N

Nicholas Paldino [.NET/C# MVP]

Why not just create a wrapper app which will execute the first job, and
then execute the second job when the first one is done? Then, schedule that
app to run.

Hope this helps.
 
D

das

Yes that is an approach but the issue is to have some control on the
times:
say 1st job is set to run at 1pm
and the requirement is that the 2nd job must not run before 2pm

Let me know, thanks
 
G

Greg Young

There are too choices here ... you could either write a wrapper that
contained the logic (i.e. if 1st job done and < 2pm wait until 2pm) or you
could go through and just have the second job scheduled for 2pm and make the
second job block until the first job is done (either through a mutex or by
checking the current running processes etc).

Cheers,

Greg Young
 

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