You can use this script to run for a specific length of time or wait for a semaphore file in an S3 bucket to complete the processing of the performance counter data ...