O'Reilly logo

CompTIA Linux+ Certification Guide by Philip Inshanally

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Crontab

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required