As the title suggest... How can I apply a scrum process to anything that doesn't work on new code and can be estimated to some degree?
How can I apply a scrum process to maintenance and emergency fixes (which can take from 5 minutes to 2 weeks to fix) type of environment when I still would like to plan to do things?
Basically, how do I overcome unplanned tasks and tasks that are very difficult to estimate with the scrum process? or am I simply applying the wrong process for this enviroment?
Basically, how do I overcome unplanned tasks and tasks that are very difficult to estimate with the scrum process? or am I simply applying the wrong process for this enviroment?
You're using the wrong process for this environment. What you need is a stack/queue management process which is separate to your planned/estimated SCRUM development process.
The reason for this is simple and twofold:
As you mention in your post, it is often very difficult to estimate maintenance tasks, especially where legacy systems are involved. Maintenance tasks in general and legacy systems specifically have a tendency to involve 'curly' problems, or have a long 'tail', where one seemingly simple fix requires a slightly more difficult change to another component, which in turn requires an overhaul of the operation of some subsystem, which in turn... you get the point.
Quite often when dealing with maintenance tasks, by the time you have finished estimating, you have also finished solving the problem. This makes the process of estimation redundant as a planning tool. Those who insist on dividing estimation from solving the problem for maintenance tasks are simply adding unnecessary overhead.
Put simply, you need a queueing system. It will have these components:
There are other nuances to queue management, but getting these in place should set you on the right path.