Difference between cron, crontab, and cronjob?

22,500

Solution 1

cron is the name of the tool, crontab is generally the file that lists the jobs that cron will be executing, and those jobs are, surprise surprise, cronjobs.

Solution 2

Cron: Cron comes from chron, the Greek prefix for ‘time’. Cron is a daemon which runs at the times of system boot.

Crontab: Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times. File location varies by operating systems.

Cron job or cron schedule: Cron job or cron schedule is a specific set of execution instructions specifying day, time and command to execute. crontab can have multiple execution statements.

Reference: http://www.adminschoice.com/crontab-quick-reference

Solution 3

I am putting this here so I can find it again when I need it and to have a place for additional input from other people. I have read several pages on this topic (some contradictory, some with examples that do not work) So here is my current understanding:

There are 2 Daemons in Linux to schedule future tasks "cron" and "at"

The idea behind "at" is to be a tool to run one off (single) future jobs, there is a variation of "at" called "batch" which will run the jobs only if system resources are almost idle

"cron" is usually used by configuring the Chronological Table or (crontab), the idea behind the cron system is to set up jobs that need to be run repetitively in the future. While most cron jobs are set using the crontab command, the cron command can be used directly to do a one off. There is a alternative to crontab called anacron which can be used if your system is not on 24/7.

Share:
22,500

Related videos on Youtube

Leo Galleguillos
Author by

Leo Galleguillos

Updated on June 12, 2020

Comments

  • Leo Galleguillos
    Leo Galleguillos almost 4 years

    Technically speaking, what is the difference between a cron, crontab, and cronjob?

    From what I can gather, cron is the utility on the server, crontab is a file which contains the time intervals and commands, and cronjob is the actual command (or file/script which contains commands).

    Is this correct?

  • Mafick
    Mafick almost 4 years
    whats about cronjob?
  • ob-ivan
    ob-ivan over 3 years
    Do you spell cronjob together or cron job separately?
  • I try so hard but I cry harder
    I try so hard but I cry harder over 2 years
    You said Cron starts at system boot. This means Cron is not part of the OS, or "within" the OS. Is the Crontab however "within" the OS, or does this too start at system boot?
  • Rory O'Kane
    Rory O'Kane over 2 years
    The correct term is “cron job” or “cron job”, not “cronjob”. (Sources: the man page for Vixie cron, the man page for ISC Cron, and the manual for GNU Mcron contain many usages of “job” as well as one usage of “cron job”, and do not contain “cronjob”.)
  • variable
    variable over 2 years
    What are the files in cron.d folder there are files - are called? Cron jobs?
  • Janac Meena
    Janac Meena about 2 years
    Cron tab is short for Cron Table