Sometimes it makes sense to automate failure. This can be way quicker than automating a task and ensures quality. Then you can proceed to automate various steps of the process depending on available time, each task's automability (is this even a word?), position in the critical path, etc.