Automation is an essential aspect of the Linux operating system. It is important for system administrators and also for penetration testers to automate many tasks to avoid wasting time in repeating them. As discussed in the previous chapter, penetration testing is a time-limited mission. So, good time management is an in-demand skill for every successful pentester. Linux gives users scheduling capabilities to run commands or scripts in a specific time, and in a repeatable manner. The cron utility is the key to achieve this. Cron gives you the ability to run a background job as a routine in a defined time. The following is a cron command format:
<Day of the week> <Month> <Day of the Month> <Hour> <Minutes> <Command> ...