Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline Jmendes1  
#1 Posted : Friday, August 19, 2011 10:55:22 PM(UTC)
Jmendes1
Rank: Newbie

Joined: 8/19/2011(UTC)
Posts: 3
Location: Boston

Hello,

I noticed that you provide several methods for shutting "off" the server, such as calling server.stop(), or changing the 'On' field to false. This offline mode no longer takes into account the schedule and future jobs until it is turned back on. The problem is that after you turn it back on, jobs that have the "Run missed Jobs once at Start" property checked and were supposed to be executed during that downtime are not executed. When you shut down the "Service" instead (right click on VC on the task manager tray, Server, Service, Off, the entire Server process is killed, and the client can no longer connect to it. Once the server comes back on from this 'Service off' mode, then the jobs with the "Run missed" property get executed at start.

I was wondering how I could programatically call this "Service" off command. When some jobs get stuck, due to performance reasons we tend to temporarily shut down the VC scheduler, but we would like jobs that were scheduled during such downtime to be executed. I'm writing a script that checks the currently running jobs, and if they're a subgroup of our specified list of "jobs that possibly get stuck", then we kill the Server service for the time being, with jobs that were supposed to be executed during downtime still eventually getting executed.

Thanks for the help!
Joao

Edited by user Friday, August 19, 2011 11:07:47 PM(UTC)  | Reason: Not specified

Offline Support  
#2 Posted : Saturday, August 20, 2011 8:46:23 AM(UTC)
Support
Rank: Administration

Joined: 2/23/2008(UTC)
Posts: 7,741

Thanks: 349 times
Was thanked: 209 time(s) in 200 post(s)
You can call the command "net":

net stop VisualCron
net start VisualCron
Henrik
Support
http://www.visualcron.com

Please like VisualCron on facebook!
Offline Jmendes1  
#3 Posted : Monday, August 22, 2011 1:52:12 PM(UTC)
Jmendes1
Rank: Newbie

Joined: 8/19/2011(UTC)
Posts: 3
Location: Boston

How do I call this command "net" in a C# script? If I have a Server object 's' that was returned by client.connect(connection, true), how do I go on to call that command through 's'?

Joao
Offline Support  
#4 Posted : Monday, August 22, 2011 1:56:59 PM(UTC)
Support
Rank: Administration

Joined: 2/23/2008(UTC)
Posts: 7,741

Thanks: 349 times
Was thanked: 209 time(s) in 200 post(s)
We have added this for next version but it is easy in .NET. Something like:
Code:

            Dim sc As New ServiceProcess.ServiceController("VisualCron")
            sc.Stop()
Henrik
Support
http://www.visualcron.com

Please like VisualCron on facebook!
Offline Jmendes1  
#5 Posted : Tuesday, August 23, 2011 4:04:20 PM(UTC)
Jmendes1
Rank: Newbie

Joined: 8/19/2011(UTC)
Posts: 3
Location: Boston

Using the windows service controller worked as planned! thanks a lot!

This is the code I used in C# (almost exact to the VB.NET one above).

Code:
ServiceController sc = new ServiceController("VisualCron");
sc.Stop();


Make sure you have admin privileges, or it will not work.
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top