WOL with webpage

Hi i’d like to create a simple page with a bunch of options to send wake up packets to a selected system on click.
Is it possible to add a page to the management webpage and have it run a script to send WOL packets when selected?
If it is possible how do i link the code from the page to a script in routerOS and where do I place it? I’ve seen that some modules or software have their own page or section on the router’s web management.

Since the router has to be on all the time this seems like a very good way to save hundreds of watts so i dont need to keep many systems on waiting for any math or code to run.

I’m not sure about a web page, but you could certainly trigger a command from the API. However, that means you need to have not only the router on, but also one other device that would act as the web server.

it is possible to create scripts and then run them via webfig.