Topic Options
#982 - 09/12/03 09:05 AM -wait
Anonymous
Unregistered


The documentation for -command -wait says that it makes wincron synchronous. In particular, this prevents the same job from being started if it is already running.

Does this apply to a single job or all jobs? That is to say, if I have three jobs set this way and Alpha runs for 24 hours will Bravo and Charlie be started in the meantime or will the ALL wayt until Alpha is finished?

Top
#983 - 09/12/03 09:19 AM Re: -wait
Luke Tomasello Administrator Offline
Member

Registered: 09/17/00
Posts: 740
Loc: San Jose, CA., USA
All WinCron Jobs run in the same thread, so Bravo and Charlie will wait as well.

However, I can imagine ways to construct a semaphore that will allow Bravo and Charlie to run while the Alpha job waits.

The Basic idea is to use environment variables or disk files to mark when a job is running. The job pseudo code would be something like:

{
-name ALPHA
if a file exists that says this job is running – break;
Otherwise do normal processing
}

There are several ways to accomplish this, let me know if you need some help constructing this script.

PS. I will be copying this post into my enhancements forum because I think you should be able to check the handle returned from the process for process-completion.
_________________________
Regards,
Luke Tomasello

Top


Moderator:  Luke Tomasello