Best practice for selecting a recurring event?

I need to allow users to set the frequency with which they would like for a certain task to occur (example- every X days/week/month/year). So far, what I've come up with is an input box and a drop down to select either Days, weeks, months or years as options. Frequency picker Could this be confusing and are there any better patterns for such cases?