How I Schedule Jobs using Crontab

Elfao
Analytics Vidhya
Published in
2 min readSep 4, 2020

--

Cron is a program that allows Unix users to automatically run tasks (scripts, commands, software…) at a pre-defined date and time.
These tasks are called cron jobs and can be used for example backing up data, sending alerting email, run scripts…

The cron jobs can be scheduled to run by a minute, hour, day of the month, month, day of the week, or any combination of these.

I. Displays the contents of the cron table

Everything we are going to do will be done on the command line. So open your terminal.

The following command line displays the contents of the cron table for the current user:
crontab -l

crontab Shell

Here, we have only 6 jobs running for this user.
All the lines that start with ‘#’ are commented and are only used to give additional information to readers.

Each job respects following rules:

mm hh dd MMM DDD task
mm: represents minutes (from 0 and 59)
hh: represents hours (from 0 and 23)
MMM: represents the number of the month (from 1 to 12) or the abbreviation of the…

--

--

Elfao
Analytics Vidhya

Data scientist with 4 years experience. I worked in different field like Marketing digital, Consulting and currently I work for a start-up in finance.