dpac_nick
Tera Contributor

If requirement is to execute some script when user logs in, there is an oob event "login" which is fired when user logs in it can be associated with script action to execute the script.

https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/platform-eve... 

If this works for you, please mark my answer correct or helpful.