No crontab command?

Every time I've ever installed Linux, including several distributions, I've always been able to run crontab commands. I'm on the latest CentOS linode offers, and I can't run crontab, even though yum says it's installed:

# sudo yum install crontabs
 <snip>Package crontabs-1.10-8.noarch already installed and latest version
Nothing to do</snip>

So I try to run crontab (as root):

# crontab
-bash: crontab: command not found

So I look for it, and indeed it's nowhere:

# find / -iname *cron*                                     
/usr/share/vim/vim70/syntax/crontab.vim                                         
/var/lib/php/session/sess_2ubvqg7cront79e93j8kp4cjs0                            
/var/log/cron                                                                   
/etc/cron.daily                                                                 
/etc/cron.daily/makewhatis.cron                                                 
/etc/crontab                                                                    
/etc/cron.hourly                                                                
/etc/cron.weekly                                                                
/etc/cron.weekly/makewhatis.cron                                                
/etc/cron.monthly

The files in /etc are not the binary, and best not edited manually, though I can do that, too. I went to library.linode.com to see if there's something special with crontab on Linode's servers, or specifically their centos server, but the article Linode has on crontab assumes it's already there. Indeed, it says that it doesn't matter what platform you are on because it works the same in all of them (which is my experience as well), but apparently they missed something with the latest CentOS… or did I miss something?

Brandon

6 Replies

@brasto:

Every time I've ever installed Linux, including several distributions, I've always been able to run crontab commands. I'm on the latest CentOS linode offers, and I can't run crontab, even though yum says it's installed:

# sudo yum install crontabs
 <snip>Package crontabs-1.10-8.noarch already installed and latest version
Nothing to do</snip>


I don't believe the crontabs package includes any binaries, but just system configuration files for a cron daemon.

Perhaps the Linode CentOS build doesn't actually include cron (one less daemon) by default. Check for vixie-cron (a common version). I suspect installing a cron daemon would include crontab along with the actual daemon

– David

I believe the crontab command is in the vixie-cron package. I thought that was in our CentOS image, but it may have been missed in the last refresh.

-James

@db3l:

I don't believe the crontabs package includes any binaries, but just system configuration files for a cron daemon.

Perhaps the Linode CentOS build doesn't actually include cron (one less daemon) by default. Check for vixie-cron (a common version). I suspect installing a cron daemon would include crontab along with the actual daemon

– David
Thank you David. I should have mentioned I ran a yum search. Here's the output, and I don't see either a daemon or a vixie-cron in the results:

# yum search cron                                 
Loaded plugins: fastestmirror, priorities                                       
================================ Matched: cron =================================
vixie-cron.x86_64 : The Vixie cron daemon for executing specified programs at   
                  : set times.                                                  
kdeadmin.x86_64 : Administrative tools for KDE.                                 
anacron.x86_64 : A cron-like program that can run jobs lost during downtime.    
at.x86_64 : Job spooling tools.                                                 
autotrust.x86_64 : DNSKEY trust anchor update utility that uses RFC-5011        
chealpix.i386 : HEALPix C Bindings Library                                      
chealpix.x86_64 : HEALPix C Bindings Library                                    
chealpix-devel.i386 : HEALPix C Bindings Library development files              
chealpix-devel.x86_64 : HEALPix C Bindings Library development files            
clamav-data.x86_64 : Virus signature data for the Clam Antivirus scanner        
clamav-update.x86_64 : Auto-updater for the Clam Antivirus scanner data-files   
cronolog.x86_64 : Web log rotation program for Apache                           
crontabs.noarch : Root crontab files used to schedule the execution of programs.
dmraid-events-logwatch.x86_64 : dmraid logwatch-based email reporting           
dwatch.x86_64 : A program that watches over other programs                      
ggz-client-libs.i386 : Client libraries for GGZ gaming zone                     
ggz-client-libs.x86_64 : Client libraries for GGZ gaming zone                   
hatools.x86_64 : Improved shell scripting in High Availability environment      
healpix.x86_64 : Hierarchical Equal Area isoLatitude Pixelization of a sphere   
healpix-c++.x86_64 : Healpix C++ binaries and libraries                         
healpix-c++-devel.i386 : Healpix C++ headers                                    
healpix-c++-devel.x86_64 : Healpix C++ headers                                  
incron.x86_64 : Inotify cron system                                             
libggz.i386 : Library for client-server games                                   
libggz.x86_64 : Library for client-server games                                 
logrotate.x86_64 : Rotates, compresses, removes and mails system log files.     
mdsplib.i386 : METAR Decoder Software Package Library                           
mdsplib.x86_64 : METAR Decoder Software Package Library                         
mdsplib-devel.i386 : Development files for the METAR Decoder Software Package   
                   : Library                                                    
mdsplib-devel.x86_64 : Development files for the METAR Decoder Software Package 
                     : Library                                                  
perl-Schedule-Cron-Events.noarch : Take a line from a crontab and find out when 
                                 : events will occur                            
perl-Set-Crontab.noarch : Expand crontab(5)-style integer lists                 
puppet.noarch : A network tool for managing many disparate systems              
rdiff-backup.x86_64 : Convenient and transparent local/remote incremental       
                    : mirror/backup                                             
rrdtool.i386 : Round Robin Database Tool to store and display time-series data  
rrdtool.x86_64 : Round Robin Database Tool to store and display time-series data
rrdtool-devel.i386 : RRDtool libraries and header files                         
rrdtool-devel.x86_64 : RRDtool libraries and header files                       
rrdtool-doc.x86_64 : RRDtool documentation                                      
rss2email.noarch : Deliver news from RSS feeds to your smtp server as text or   
                 : html mail                                                    
ruby-irb.x86_64 : The Interactive Ruby.                                         
sphinx.x86_64 : Free open-source SQL full-text search engine                    
yum-cron.noarch : Files needed to run yum updates as a cron job                 
yum-updateonboot.noarch : Run yum update on system boot                         
zikula-module-MultiHook.noarch : MultiHook is a simple replacement for the old  
                               : AutoLinks module for Zikula

vixie-cron is the first result

@Alucard:

vixie-cron is the first result
Good find Alucard, I didn't see it because the first two are the only ones not in alphabetical order with the rest. I automatically looked near the bottom. Perhaps I should have piped it into sort… I'll install it and see if it resolves the issue.

Ok, installing the vixie-cron package put the binary in there. Thank you everyone.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct