Automatically restarting the scheduler  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Automatically restarting the scheduler

Postby pricerc » Thu Feb 04, 2021 6:57 am

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.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Automatically restarting the scheduler  Topic is solved

Postby Mike.Sheen » Thu Feb 04, 2021 2:55 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Automatically restarting the scheduler

Postby DannyC » Thu Feb 04, 2021 4:22 pm

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.
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Automatically restarting the scheduler

Postby SBarnes » Thu Feb 04, 2021 6:07 pm

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1618
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 5 guests

cron