In our home made Continuous Integration system we wanted to make sure there is only one process is running at a time and we also wanted to be able to show the status of the currently running process. First, when we only wanted to have the 1 process at a time limitation we used a file locking mechanism, but adding the status seemed to be difficult. Switching to SQLite make the solution rather easy and also gives us many more opportunities.

In this example you'll see the implementation.