Schedule a Job in Cron to Run Every Hour in Ubuntu 20.04 - How to implement it ?
This article covers how a cron job can be scheduled to run every hour on Ubuntu System. Most Linux users are familiar with the Crontab job scheduler, which acts as a silent daemon that performs all the tasks assigned to it automatically, without any human intervention.
This job scheduler makes the life of a Linux user much easier, as the user can hand over all the frequently occurring tasks to the Crontab scheduler so that these tasks can be executed automatically according to a specified schedule.
To Start Crontab Service
Run the following command:
$ sudo systemctl start cron
To Check Status of Crontab Service
Execute the command:
$ sudo systemctl status cron
To Launch Crontab File:
Execute the command:
$ crontab –e
To Run a program or script every 5 or X minutes or hours on Linux:
1. Edit your cronjob file by running crontab -e command.
2. Add the following line for an every-5-minutes interval. */5 * * * * /path/to/script-or-program.
3. Save the file, and that is it.
