As we've just seen, we can place our tasks in their respective /etc/cron.* directory. This then gets executed every hour, day, or monthly. However, we can get even more flexibility; instead of placing our scripts in the /etc/cron.* directory, we can place our script inside crontab itself. We can explore the /etc/crontab file:

root@philip-virtual-machine:/home/philip# cat /etc/crontab# /etc/crontab: system-wide crontab# Unlike any other crontab you don't have to run the `crontab'# command to install the new version when you edit this file# and files in /etc/cron.d. These files also have username fields,# that none of the other crontabs do.SHELL=/bin/shPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin# m h dom mon dow ...

Get CompTIA Linux+ Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.