User Tools
databaseandnetworkmanagement:install_cron
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| databaseandnetworkmanagement:install_cron [2017/03/28 14:40] – [Install cron on a Server REHL 6.6] ywang | databaseandnetworkmanagement:install_cron [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Install cron on a Server - REHL 6.6 ====== | ||
| + | |||
| + | Author: Yanjun Wang | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | The cron is a time-based job scheduler. People who set up and maintain software environments use cron to schedule jobs to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Process and Commands ===== | ||
| + | |||
| + | Connect to the desired server (the installing process need root permission or use sudo): | ||
| + | ssh root@hostname | ||
| + | Determine if the cronie package is already installed: | ||
| + | rpm -q cronie | ||
| + | If the cronie package is not installed, try to install the cronie package through yum firstly: | ||
| + | yum install cronie | ||
| + | From the message from the server, if the current system is not registered to Red Hat Subscription Management, using local package file to install cronie. | ||
| + | Or if it shows the installing process and finally “complete”, | ||
| + | |||
| + | For installing the cronie package from a local file, check the machine hardware name/ | ||
| + | uname –m | ||
| + | Or check the cronie package on other servers for reference. | ||
| + | |||
| + | Download a right cronie resource file from a resource website depending on the architecture of the server. (As a reference, here I download cronie-1.4.4-12.el6.x86_64.rpm from https:// | ||
| + | |||
| + | Upload the cronie package file from your server to the remote desired server through ssh: | ||
| + | scp / | ||
| + | Change directory to / | ||
| + | rpm -ivh cronie.rpm | ||
| + | If the return message shows that there need other dependencies for this package, check if these dependencies are needed on the other servers. If the answer is Yes, install these dependencies package following the same process with installing cronie. Or if the answer is that they are not essential, use options to install the cronie package by force: --nodeps –force | ||
| + | |||
| + | So the command should be: | ||
| + | rpm -ivh cronie.rpm --nodeps –force | ||
| + | |||
| + | **The process of installing cron is now finished.** | ||
| + | |||
| + | **The following part is about turning on the cron service.** | ||
| + | |||
| + | Determine if the service is running: | ||
| + | service crond status | ||
| + | Run the crond service: | ||
| + | service crond start | ||
| + | Configure the service to be automatically started at boot time: | ||
| + | chkconfig crond on | ||
| + | |||
| + | **After turning the cron service on, comment out all the current running crons through crontab if needed.** | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== References ===== | ||
| + | |||
| + | RedHat Guide for Automating System Tasks: | ||
| + | https:// | ||
| + | |||
| + | Resource for cronie package: | ||
| + | https:// | ||
| + | |||