cron command not found

In this troubleshooting guide we learn how to fix cron command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

cron: command not found

or when using sudo you get the following error message

sudo: cron: command not found

Solutions to cron: command not found

How To Fix cron: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu cron is provided by cron package.

cron is:

The cron daemon is a background process that runs particular programs at particular times (for example, every minute, day, week, or month), as specified in a crontab. By default, users may also create crontabs of their own so that processes are run on their behalf.

Output from the commands is usually mailed to the system administrator (or to the user in question); you should probably install a mail system as well so that you can receive these messages.

This cron package does not provide any system maintenance tasks. Basic periodic maintenance tasks are provided by other packages, such as checksecurity.

To fix this problem, we can install more using the command below.

sudo apt-get -y install cron

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install cron.

sudo apt -y install cron

Or if you have aptitude installed you can use the following command.

sudo aptitude install cron

Summary

In this tutorial we learn how to fix cron command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.