added delay/waiting time before scheduled task is run
simplified delay/waiting time code before scheduled task is run - removed the threading stuff which was becoming too complicated