How to trigger a function when the Crawler has finished running?

Once the crawler has finished running and has crawled all pages from a website, how do we know it's finished running so we can trigger some other function?
Was this page helpful?