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. Could this be confusing and are there any better patterns for such cases?
Planning of tasks tends to be more contextual than mathematical. What does that mean? It means that you
- go to soccer practice every Tuesday,
- pay your rent on the last work day of the month,
- download that report on every 15th,
- meet with Jeff on the first Monday of each month
- check up on aunt Jeannie at least once in a quarter.
In the Gregorian calendar, only the first bullet point is a consistent interval. All other "tasks" depend upon the length of months, placement of calendar weeks, work week definitions, beginning of the week definitions.
What you need to do is to
- Give a natural language context (for your locale)
- Take away complexity in the beginning
- Offer the most popular choices
- Allow customization down the road
Microsoft, e.g., is doing a good job with this in their Outlook web app. (Even if somewhat inconsistent cross-device)
I would say that your approach should depend on the tasks your users need to perform. For example:
- if I want to schedule a meeting which occurs every Monday morning I would want to set a start/end date and frequency
- if I am a doctor and plan therapy for my patient I would probably prefer to choose the number of occurrences and don't bother about the start/end date.
- I may want to use a combination of the above
Explore the user flow and what users need to achieve their goals and you will find the answer.