Pipeline status

Is there a way to read the status of the a pipelines last run time?

We have a pipeline which moves and transforms documents from one system to another and we want to pull the docs from the first system created after the last successful run of the pipeline.

We currently write the status to a SQL db and use this as the last run date/time, but I thought that there might be a better way.