 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
NathanW
Joined: 05 Feb 2009 Posts: 51 Country: United Kingdom |
|
QueueJob not working in ASP.net |
|
I have the following code in an ASP.net page which returns the error "Public member 'QueueJob' on type 'vbRemote24x7' not found." (using w24x7ASP.vbRemote24x7) and I cannot see what I am doing wrong. If I use "24x7 Remote Control" I get a different error "Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))".
Dim RC As Object
Dim Remote_24x7 As Object
Remote_24x7 = CreateObject("w24x7ASP.vbRemote24x7")
rem 24x7 Remote Control
RC = Remote_24x7.OpenSession("", "12345", "WinSock", "192.168.31.24", "1096", "", False)
If RC <> 1 Then
response.write("Error: " & Remote_24x7.LastError)
Else
RC = Remote_24x7.QueueJob(11450)
response.write("The emails have been queued for sending.")
End If
RC = Remote_24x7.CloseSession()
Remote_24x7 = Nothing
|
|
Tue Mar 24, 2009 12:47 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7953
|
|
|
|
QueueJob is a recently added method. Let me check if it is available in all supported COM interfaces. This may take a little while.
|
|
Tue Mar 24, 2009 1:23 pm |
|
 |
NathanW
Joined: 05 Feb 2009 Posts: 51 Country: United Kingdom |
|
|
|
Brilliant, as I want to queue a job based on a user submitting a form on a website. Do you have any plans to compile a .net version like the com interface?
|
|
Tue Mar 24, 2009 1:57 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7953
|
|
|
|
I'm still checking on QueueJob.
|
|
Tue Mar 24, 2009 5:22 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7953
|
|
|
|
This is a bit of a mystery for now. The QueueJob method is documented in latest API references for both COM and Java APIs, but this method doesn't seem to be available in the 24x7 Scheduler Windows edition yet. It is only available in 24x7 MP edition.
Here is an alternative solution suggested for running a job and not making it block the caller job or process. Note that the third parameter in RunSheelcommand makes the job run asynchronous to the caller process and the caller process is not blocked.
 |
 |
Dim RC As Object
Dim Remote_24x7 As Object
Remote_24x7 = CreateObject("w24x7ASP.vbRemote24x7")
rem 24x7 Remote Control
RC = Remote_24x7.OpenSession("", "12345", "WinSock", "192.168.31.24", "1096", "", False)
If RC <> 1 Then
response.write("Error: " & Remote_24x7.LastError)
Else
RC = Remote_24x7.RunShellCommand("24x7.exe /JOB 11450", "", True, 0)
response.write("The emails have been submited for processing.")
End If
RC = Remote_24x7.CloseSession()
Remote_24x7 = Nothing |
|
|
Wed Mar 25, 2009 8:27 am |
|
 |
NathanW
Joined: 05 Feb 2009 Posts: 51 Country: United Kingdom |
|
|
|
Very sneaky! That works perfectly. Thanks.
|
|
Wed Mar 25, 2009 10:07 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|