Sometimes I find myself needing to do something that could be automated or could be manual. E.g. I just ran a particular script 8 times, making a small change in between each run. I certainly could have written a script that would have automated this, but in this instance I decided it was quicker to just run it manually each time.
But sometimes I realize after I've put a bunch of time into doing something manually that I'd have been better off automating it in the first place.
Any suggestions for rules of thumb that would help me decide, before I start some repeated process, whether it's worth investing the time to write a script to automate it?
For clarification: the kinds of things I'm talking about are sysadmin-type stuff like moving files around, renaming things, etc. and DBA-type stuff such as running a SQL script to import certain data (this is what I was doing today). Note that I'm a developer, not a sysadmin or a DBA.
Reasons I have for scripting include
When:
you do it the second time
it becomes more than one step
it's easy to get wrong
it's easy to forget how to do it manually