For example, a website operator may write a script to parse the logs of the website traffic and generate a report. If done manually by a human, this process might take hours or days. However, a computer might complete these tasks in seconds and can be programmed to repeat the task several times a day.
When should you automate?
Any task performed more than once should be automated, even if it's a simple task that takes a few seconds. If a task takes five seconds to complete but needs to be performed ten times a day, automation can save you over four hours a year if completion time is reduced to one second.
How to automate?
The answer to this question depends on the type of task you want to automate. Below lists different methods and tools for automating tasks, from the simplest to the most complex.
Computer keyboard shortcuts are a form of automation in that they allow you to complete an operating system or program task. For example, when you copy and paste text, you can duplicate text in multiple places without having to type the text.
Online services like IFTTT (if this then that) help automate online tasks. For example, you could automate the job of automatically uploading any photo you post on Instagram to a Facebook album automatically.
A macro is a small segment of code created in a program to perform several commands. Although some programs allow you to record your actions to create a macro, most require you to know some code or commands.
AutoHotkey is a fantastic free Microsoft Windows program that automates almost anything in Windows. Using this tool, you can automate anything done with a keyboard or mouse on a computer. The scripts the program creates require AutoHotkey be running on the computer but also supports the ability to make self-running scripts.
Command line automation
For any tasks done through a command line, many different options are available to the users. Microsoft Windows users using the command line or MS-DOS can use batch files to automatically perform commands. Linux users can use any of the scripting languages mentioned below and also use cron to schedule tasks.
Creating a program
Creating a program to automate a task can take longer than any of the above options. However, for more complex tasks and improved speed may be the only option. To create a program, you'll need to learn how to program and a compiler to compile the program for the platform running the program.
When should you not automate?
Although automation helps with many tasks, there is still the following reason why you may not want to automate a task.
- The task is not repeated frequently enough.
- Task requires some human intelligence that cannot be programmed.
- There are too many unknown variables that make automation impossible.
- Protection, like CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart), prevents automation.
- Cannot justify the time or money required to program the automation.
For easy-to-do tasks that require a human and cannot be automated (e.g., identifying what's in a picture), consider services like Amazon's Mechanical Turk.