Script(s) needed to monitor for JavaScript-errors and SSL-certificate


I’ve been looking for a script to

a) monitor a page/URL for JavaScript errors


b) automatically check a host for a valid SSL-certificate (certificate expired, etc.)

The scripting language is not really important as I’m planning on running the script(s) via CRON on a Virtual Private Server.

Any input is appreciated. Thanks!