NetXMS Support Forum

English Support => General Support => Topic started by: gdodd on October 20, 2018, 12:13:24 AM

Title: Schedule Maintenance with a script
Post by: gdodd on October 20, 2018, 12:13:24 AM
Is there a way to schedule maintenance on a node from a script (or another automated way to schedule maintenance)?

I want to automate putting the node into maintenance when a process has finished and closed, reboot the node, and then come out of maintenance an hour later. I can do everything I want except get the node out of maintenance.

Thank you

Gary
Title: Re: Schedule Maintenance with a script
Post by: Tatjana Dubrovica on October 22, 2018, 02:44:56 PM
The only option I see is to set custom attributes with maintenance entrance time on EnterMaintenance($node) function execution. Create a script that will go through all nodes every minute and will check the custom attribute with maintenance start and will initiate maintenance leave in case if the note is in maintenance more than an hour.