script autorun via web

Hi,

I want to automatically run a script in my mikrotik device every time i log in via web interface

anybody know how to do it???

I’ve done something similar that checks for new/failed logins, and then sends email: http://forum.mikrotik.com/t/is-it-possible-to-run-a-script-on-login/55422/1 It could be easily modified. Use the scheduler to run the script every X seconds (however often you want it to check)

If you only want to monitor web logins, change this line of the script to:
:local currentBuf [ :toarray [ /log find message~“\blogged in\b.*\bvia web\b$” ] ] ;

thank you,

but is there any other way to do it without to use scheduler?

I have not found another way. It would be nice to have a way to run a script on login similar to the Hotspot User Profiles
hs user profile scripts.png

I expected that there is NO other way to do it, except script-scheduler.

True, it would be very helpful if we could run a script similar like Hotspot login.

Anyway, i did it with script-scheduler.

Thanks for your time.