SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
QueueJob not working in ASP.net

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
QueueJob not working in ASP.net
Author Message
NathanW



Joined: 05 Feb 2009
Posts: 51
Country: United Kingdom

Post QueueJob not working in ASP.net Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7953

Post Reply with quote
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 View user's profile Send private message
NathanW



Joined: 05 Feb 2009
Posts: 51
Country: United Kingdom

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7953

Post Reply with quote
I'm still checking on QueueJob.
Tue Mar 24, 2009 5:22 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7953

Post Reply with quote
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.


Code:
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 View user's profile Send private message
NathanW



Joined: 05 Feb 2009
Posts: 51
Country: United Kingdom

Post Reply with quote
Very sneaky! That works perfectly. Thanks.
Wed Mar 25, 2009 10:07 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.