Link to home
Start Free TrialLog in
Avatar of deklinm
deklinmFlag for United States of America

asked on

Crontab Not in CentOS

How do i install crontab if its not there?
Avatar of farzanj
farzanj
Flag of Canada image

Check the service:

service crond status

Open in new window

If it is not running, run it.

service crond start
chkconfig crond on

Open in new window


Then edit as root or the allowed user.

crontab -e -u USERID

Open in new window


-u USERID is optional part.
Avatar of deklinm

ASKER

its not there.  is there a manual install command?
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kerem ERSOY
Kerem ERSOY

Hi,

Crontab is always there. Only the place for crontab files a bit different than other distros. So that if you're root you cant just use crontab -e for editing.

Crontab file is in /etc/crontab you can run jobs trough there as root or another user.

also if you want to run other jobs from cron to can add your scripts in /etc/cron.d. Please check the files already in there to have a general opinion about how to create cron jobs.

Also you can put your scripts under /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly or /etc/cron.monthly.

For more information on CentOS CRON check here:

CentOS Cron Usage

Cheers,
K.