added a periodic worker

The periodic worker will call a function periodically based on an input duration
I don't think this should have moved?