I have a requirement ,let us say 1000 files needs to be transferred in an hour from one path to another path and if the files (1000 files) are transferred within an hour ( say 40 mins), then the process should remain idle for the remaining time ( 20 mins).
not tested though, and also wouldn't work if say the script is launched around midnight.. need to add the days, month and years in the calculation.
good luck.