How to submit a job?

How to submit a job?

am 02.05.2005 08:51:03 von Kam

After the form is submitted in ASP environment, I would like to call a dos
program, but I don't want the ASP to wait. The dos program will run
independently. (For example, a dos copy, I don't want to wait under it
finish. I would like to let the use know the job is submited, so the user
will get an immediate response.

How can I do it?

Re: How to submit a job?

am 02.05.2005 10:07:53 von Kyle Peterson

though some might consider this random

one way you can try would be to make an asp that runs the dos program on the
server
(and makes sure it works ok)

then just use the xml parser component to make that page run
your code calling it wont really have to wait because of the timeout on the
page making the call .. the page will just run and do its thing I think

I do something similar in a global.asa on a site that grabs a lot of news
feed content and writes it locally periodically
It has always worked fine

this is how you use the xml parser

Server.ScriptTimeout = 2
Set HttpObj = Server.CreateObject("AspHTTP.Conn")
HttpObj.Url = "http://www.mysite.com/mypage.asp"
HttpObj.RequestMethod = "GET"
HttpObj.UserAgent = "Mozilla/2.0 (compatible; MSIE 3.0B; Windows NT)"
strResult = HttpObj.GetURL




"Kam" wrote in message
news:0479D4DF-96F4-451C-BC4B-6903ABFB366E@microsoft.com...
> After the form is submitted in ASP environment, I would like to call a dos
> program, but I don't want the ASP to wait. The dos program will run
> independently. (For example, a dos copy, I don't want to wait under it
> finish. I would like to let the use know the job is submited, so the user
> will get an immediate response.
>
> How can I do it?

Re: How to submit a job?

am 02.05.2005 11:39:19 von McKirahan

"Kam" wrote in message
news:0479D4DF-96F4-451C-BC4B-6903ABFB366E@microsoft.com...
> After the form is submitted in ASP environment, I would like to call a dos
> program, but I don't want the ASP to wait. The dos program will run
> independently. (For example, a dos copy, I don't want to wait under it
> finish. I would like to let the use know the job is submited, so the user
> will get an immediate response.
>
> How can I do it?

Is the DOS program on the client or the server?

You can't run it on the client without a security warning.

Also, if you're only doing "copy" then you should use
the FileSystemObject's CopyFile().

What would be the form of the "immediate response"?

Re: How to submit a job?

am 02.05.2005 12:28:02 von Kam

The program will run on the server only.

I will run dos copy after a certain lengthy process finished.
I don't want to create a very complicated job queuing and processing system.

So I am looking at running the program independently on a seprate window.
After the user submit the request, it will come up with the "Job is
submitted".




"McKirahan" wrote:

> "Kam" wrote in message
> news:0479D4DF-96F4-451C-BC4B-6903ABFB366E@microsoft.com...
> > After the form is submitted in ASP environment, I would like to call a dos
> > program, but I don't want the ASP to wait. The dos program will run
> > independently. (For example, a dos copy, I don't want to wait under it
> > finish. I would like to let the use know the job is submited, so the user
> > will get an immediate response.
> >
> > How can I do it?
>
> Is the DOS program on the client or the server?
>
> You can't run it on the client without a security warning.
>
> Also, if you're only doing "copy" then you should use
> the FileSystemObject's CopyFile().
>
> What would be the form of the "immediate response"?
>
>
>

Re: How to submit a job?

am 02.05.2005 12:51:14 von reb01501

It would be best to do this outside of the ASP process. How about utilizing
MSMQ?
http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls =GGLC,GGLC:1969-53,GGLC:en&q=ASP+MSMQ

Bob Barrows

Kam wrote:
> The program will run on the server only.
>
> I will run dos copy after a certain lengthy process finished.
> I don't want to create a very complicated job queuing and processing
> system.
>
> So I am looking at running the program independently on a seprate
> window. After the user submit the request, it will come up with the
> "Job is submitted".
>
>
>
>
> "McKirahan" wrote:
>
>> "Kam" wrote in message
>> news:0479D4DF-96F4-451C-BC4B-6903ABFB366E@microsoft.com...
>>> After the form is submitted in ASP environment, I would like to
>>> call a dos program, but I don't want the ASP to wait. The dos
>>> program will run independently. (For example, a dos copy, I don't
>>> want to wait under it finish. I would like to let the use know the
>>> job is submited, so the user will get an immediate response.
>>>
>>> How can I do it?
>>
>> Is the DOS program on the client or the server?
>>
>> You can't run it on the client without a security warning.
>>
>> Also, if you're only doing "copy" then you should use
>> the FileSystemObject's CopyFile().
>>
>> What would be the form of the "immediate response"?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: How to submit a job?

am 02.05.2005 13:05:12 von exjxw.hannivoort

=?Utf-8?B?S2Ft?= wrote on 02 mei 2005 in
microsoft.public.inetserver.asp.db:

> The program will run on the server only.
>
> I will run dos copy after a certain lengthy process finished.
> I don't want to create a very complicated job queuing and processing
> system.
>
> So I am looking at running the program independently on a seprate
> window. After the user submit the request, it will come up with the
> "Job is submitted".
>

Have ASP with Scripting.FileSystemObject
make a file called "doprint.txt".

Skedule a [batch, cscript] job on that server that looks for this file,
say every 1 or 10 minutes or whatever interval,
and if it exists 1 deletes that file and 2 does your copy-job.


--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)