Page 1 of 1

Automatically restarting the scheduler

PostPosted: Thu Feb 04, 2021 6:57 am
by pricerc
It would be really helpful if the scheduler could be restarted from the Jiwa front-end somehow, probably from inside the Plugin Maintenance screen.

So when I send my customer an updated plugin, I don't have to also remind them to log on to the server and restart the service after loading the new plugin.

Re: Automatically restarting the scheduler  Topic is solved

PostPosted: Thu Feb 04, 2021 2:55 pm
by Mike.Sheen
pricerc wrote:It would be really helpful if the scheduler could be restarted from the Jiwa front-end somehow, probably from inside the Plugin Maintenance screen.

So when I send my customer an updated plugin, I don't have to also remind them to log on to the server and restart the service after loading the new plugin.


Yeah, nah - not appropriate when you consider the plugin scheduler is it's own independent service and you can have many copies of it running servicing different databases and subsets of plugins within that database; We wouldn't know from within the plugin maintenance form which windows services to send restart requests to.

Re: Automatically restarting the scheduler

PostPosted: Thu Feb 04, 2021 4:22 pm
by DannyC
Ryan,

I think I did this many moons ago by having a menu option which launched a BAT file to stop & start the plugin scheduler service.
IIRC, I think the Windows logged-in user needed sufficient permissions on the server to also fiddle with services.

Re: Automatically restarting the scheduler

PostPosted: Thu Feb 04, 2021 6:07 pm
by SBarnes
I have used the service controller class for .net to do a similar thing before see https://docs.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicecontroller?view=dotnet-plat-ext-5.0 but like the batch method that Danny mentioned the user needs admin privileges for it to work.

The advantage of the .net method is you don't have to be on the same machine as the service controller class has a constructor that can take the machine name.