Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


hzkthf
2009-12-11T19:01:04Z
Hi,

I am new to VisualCron without a lot of experience doing API coding. We have multiple servers running jobs. We will have a VisualCron Server running on each of our servers with the appropriate jobs defined. Some jobs on server A are dependent on jobs on Server B completing. What I would really like to do is set up a VisualCron job on Server B with 2 tasks. First task runs the Server B Application and then the second task will run a VisualCron job on Server B.

What I really want.
1. Create a process (dll?) to which I can pass parameters for server and job. This process will run the job on the server passed. (It would be nice if I could run the VS job directly without writing an interface but it appears the VS UI only allows this within a specific server, not accross servers)

Is this possible and are there any samples out there.

Thanks
Sponsor
Forum information
hzkthf
2009-12-12T00:39:13Z
Hi, I've duplicated the sample code in my .net job and can successfully connect to my local VC server. When I try to connect to a remote server it does not connect. I get no error messages but when I look at the server connect attribute (through debug) it is not connected so I cannot access my jobs to submit them for execution. Any suggestions on things I can try or more information I can supply. If we are unable to submit VisualCron jobs on remote server then we may not be able to use VisualCron as a solution at all.

Client c = new Client();
c.LogToFile = false;
Connection conn = new Connection();
conn.Address = "remote-server-name";
conn.UserName = "admin";
conn.PassWord = "";
conn.Port = 16444;
conn.ConnectionType = Connection.ConnectionT.Remote;
try
{
s = c.Connect(conn, true);
}

catch (VisualCronAPI.Client.ClientLoginFailedException ex)
{
MessageBox.Show(ex.Message);
}

if (s.Connected)
{
foreach (JobClass j in s.Jobs.GetAll())
{
jobid = j.Id;
}
}

Application.Exit();
Support
2009-12-12T00:54:19Z
Hi,

we do not yet have any no Server to Server communication. We have some thoughgs about that.

About your connection problem. Seems strange that you do not get any error? Perhaps a timeout? Remote connection uses TCP so it may be a a firewall blocking on the port 16444?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hzkthf
2009-12-15T22:21:40Z
Ok, I must have been getting an error but wasn't capturing it correctly. I had multiple problems which have been touched on in these forums. 1st one was the remote server did have a firewall that was blocking port 16444. Another problem was using the wrong versons of the visualcron.dll and visualcronapi.dll as references in my .net build.
Support
2009-12-16T11:12:29Z
Ok, does everything work for you now?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hzkthf
2009-12-17T17:13:20Z
yes, I have been able to run my .exe passing in server name and job ID to run visualcron jobs defined on other servers.

What exactly gets displayed in the job/task logs (Message) in the VC UI? I'm trying to catch exceptions and display more information on error but can't seem to accomplish this.
Support
2009-12-17T18:17:19Z
You can capture output or exit code. If you install the latest beta 5.4.8. you have exit code on the Process.JobEnded event.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top