How to check when script was last triggered

That information can be obtained using a template: {{state_attr('script.XXXX','last_triggered')}}

If you need help incorporating templating into your automation you will need to post the automation.