Member-only story
Automate Your Tasks - How to Set Up Cron Jobs in Linux
3 min readMay 21, 2024
Lets clarify what a cron job, cron, and crontab are
Cron job is a scheduled task which runs periodically on your system. It is useful for automation, whether for your website backend, system backup, or just a simple script which logs your running applications.
The terms crontab and cron are often used interchangeably, but they refer to different aspects of the same system:
- Cron is a time-based job scheduler in Unix-like operating systems. It allows users to run scripts or applications at scheduled times. The cron daemon (or service) runs in the background and checks the
/etc/crontab
file and the/etc/cron.d/
directory for schedules and tasks to execute. It also reads the crontab files created by users. - Crontab refers to a configuration file where users can set up their scripts to run periodically on a given schedule. Each user has their own crontab file, which they can edit using the
crontab -e
command.
Setting up your cron job
I assume you already have a script or application that you want to run. In the…