Run script on user login

Hello, is there a foolproof method to run a script on user login? Everytime any user login or specific user doesn’t really matter in my case.

I feel like i searched the whole forum, but found only years old posts with nothing solid that works in latest versions.

There is nothing foolproof even in your life.

There is no “on-login(/on-logout/on-fail-login/on-pwd-change)” function for users on RouterOS.
End of discussion.

So, the only logical way is to create a schedule that run each 5 (can suffice, for no stress CPU) seconds or more appropiately,
where the script inside checks if the last-logged-in value of a user has changed since the last check.
If so, it performs the desired action.

Kinda as I thought, that’s a shame though. Thank you