I have done something similar to what Frank Wang suggested in the past.
Maybe try this also.
Create a new .bat file that contains:
NET STOP B1LicenseService
NET STOP TAO_NT_Naming_Service
NET START TAO_NT_Naming_Service
NET START B1LicenseService
There is a dependency between these two services which might be why you got a license related error.
If this works, you can restart the server at 12:00am, schedule the services restart at 12:30am and it should be right.
Good luck!
Kind Regards,
Nick Lakasas