LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-16-2006, 07:11 PM   #1
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Rep: Reputation: 30
no crontab?


before i made cronjobs using the "crontab" command (this is on centos 4) after reinstalling my entire server (including the OS) i haven't been able to figure out the cronjob/crontab thing. first of all it doesnt seem to take notice of the existance of a crontab command (says command not found) i did use yum install crontabs to install it (but i think its just a related to crontabs installation) i see the crontab files inside my /etc directory and i tried writing in a new cronjob that i want and saved the file. but it is not working.


any ideas?

edit:

ps aux | grep crond

does not show crond running, and i do not see an entry for it in chkconfig --list to turn it on. so somehow/someway crond wasnt installed at all?

(i dont know where else to find it to start it up, i look around but with no luck, this is on a server which i rent and have root access to, by reinstalling the server all i mean is that i pressed the button on the website to "rebuild" my server. perhaps the script did not include installing crontab etc

Last edited by MrSako; 12-16-2006 at 07:15 PM.
 
Old 12-16-2006, 08:37 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,017
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
What does "rpm -qa |grep cron" show?

Crontabs are created in /var/spool/cron. They will have the name of the user.

Crond should be running.

If it says command not found it either means you don't have it or you just don't have a path to it.

The file in /var/spool/cron isn't created until you add something to cron with "crontab -e". You can list it with "crontab -l" if it has anything. For a test you could just add a comment to it. You should edit with the -e rather than doing a vi on the file.
 
Old 12-16-2006, 09:11 PM   #3
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try

#chkconfig crond on

and see if that works
 
Old 12-18-2006, 06:47 PM   #4
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
# rpm -qa | grep cron
crontabs-1.10-7


# chkconfig crond


returns nothing
 
Old 12-18-2006, 07:15 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,492
Blog Entries: 54

Rep: Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910Reputation: 2910
Install crond, then?
 
Old 12-18-2006, 09:32 PM   #6
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,017
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
crontabs only puts in:
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/usr/bin/run-parts

You can see that by typing "rpm -ql crontabs".

On my FC4 (which has the same version of crontabs you have) I also have vixie-cron which is what provides crond among other things:
rpm -ql vixie-cron
/etc/cron.d
/etc/pam.d/crond
/etc/rc.d/init.d/crond
/etc/sysconfig/crond
/usr/bin/crontab
/usr/sbin/crond
/usr/share/man/man1/crontab.1.gz
/usr/share/man/man5/crontab.5.gz
/usr/share/man/man8/cron.8.gz
/usr/share/man/man8/crond.8.gz
/var/spool/cron

Not sure if that's available for CentOS but suspect it is. If you're running yum you can do "yum whatprovides /usr/sbin/crond" or if that returns nothing "yum whatprovides crond". You can then use yum to install the package it shows.
 
Old 12-19-2006, 02:02 AM   #7
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
chkconfig crond won't return anything

chkconfig on

should set it to run in default runlevels

type

chkconfig --list

to see if crontab thinks it's there (it may be set to off in all runlevels)

if it's there but listed as off at all levels, type chkconfig crond on

Last edited by billymayday; 12-19-2006 at 02:03 AM.
 
Old 12-19-2006, 02:04 AM   #8
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
addendum

perhaps try

chkconfig --list | grep crond

to streamline things
 
Old 12-19-2006, 05:35 PM   #9
pufrog
LQ Newbie
 
Registered: Dec 2006
Location: Past few years in high deseret mountians in UT. Desire an acerage & want to go to a more environmentally friendly way of living.
Distribution: Debian, Puppy, K & Ubuntu
Posts: 1

Rep: Reputation: 0
Red face cron crontab crontabs et all

I have just strated running Puppy Linux & having followed this thead for a few days I find that nothing suggested works for me.
After doing some sniffing thru the file system structure,
I find that Puppy is not arranged at all like Debian, the only other system that I am some what familiar with.
QUESTION: Are all, or most, of the other main stream Linux distros so different from each other also.?
I am extremely frustrated w/ Linux so far, even though
I think its basic principles are fantastic. I want to make
Debian my "main" distro, but thought I could learn some things from Puppy. Puppy is the only distro of 4-5 I have laying around the house that came up with out a problem.
But now that it is up it I have trouble getting it to do what I want. Their cron GUI does not make sense and does not work. So, cron does not work on either disrto ... yet ... but it will, it will.
However, to Puppy's credit, it did allow an easy path to using my external Hayes modem AND gettting on the NET.
For this I am very glad and pleased. Something I have not yet been able to do on Debian.

Sheesh, what a way to have fun.!!
Any comments.? -- and thanks for "listening".
 
Old 12-19-2006, 06:47 PM   #10
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,017
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
Haven't used Puppy. Am aware the Ubuntu/Edgy are Debian derived.

Fedora, Redhat and Centos (and VMware) are RedHat derived.

The great thing about Open Source is you can configure things any way you want. The down side to Open Source is that people do that.

Debian and Redhat are definitely different.

The idea is to pick the flavor whose philosophy most closely matches yours (or better yet most closely matches your requirements). There are a lot of Linux folks that install different versions over and over (a great use for VMware by the way) just to see if there is anything they like about it. (Can you say geeks?)
 
Old 12-19-2006, 08:17 PM   #11
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Just as an aside, be careful jumping into threads and (I think it's called) hijacking. Some people get ver peeved off when it happens
 
Old 12-19-2006, 09:51 PM   #12
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jlightner
crontabs only puts in:
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/crontab
/usr/bin/run-parts

You can see that by typing "rpm -ql crontabs".

On my FC4 (which has the same version of crontabs you have) I also have vixie-cron which is what provides crond among other things:
rpm -ql vixie-cron
/etc/cron.d
/etc/pam.d/crond
/etc/rc.d/init.d/crond
/etc/sysconfig/crond
/usr/bin/crontab
/usr/sbin/crond
/usr/share/man/man1/crontab.1.gz
/usr/share/man/man5/crontab.5.gz
/usr/share/man/man8/cron.8.gz
/usr/share/man/man8/crond.8.gz
/var/spool/cron

Not sure if that's available for CentOS but suspect it is. If you're running yum you can do "yum whatprovides /usr/sbin/crond" or if that returns nothing "yum whatprovides crond". You can then use yum to install the package it shows.
# yum provides /usr/sbin/crond
Searching Packages:
Setting up repositories
Reading repository metadata in from local files


vixie-cron.x86_64 4:4.1-44.EL4 base
Matched from:
/usr/sbin/crond


there seems to be a version of this vixie thing for my distro.

what exactly is it though? how different is it to use/whats different about it?
 
Old 12-19-2006, 11:15 PM   #13
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you tried

chkconfig --list | grep crond

yet?
 
Old 12-20-2006, 08:55 AM   #14
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,017
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
It appears the crontabs package only provides the crontab files (as seen above) but not the actual executables to run cron. (FYI: These are specialized files - I don't actually use these - I prefer doing cron via crontab -e which makes the user specific crontab files I'd mentioned in an earlier post.)

It is vixie-con that provides the executables along with other components. Notice it includes the init.d script that would be used for ckconfig to turn it on/off.

You should just run "yum install vixie-cron.x86_64 4:4.1-44.EL4 base" to install it.

Amazing how many posts here keep telling you to run ckconfig when it is clear from your earlier post that you don't have crond installed at all. AFTER you do the above INSTALL you should be able to run "ckconfig --list crond" to see if it is set to run automatically. On mine I have:
crond 0: off 1: off 2: on 3: on 4: on 5: on 6: off

Also you can run "service crond status" to see if it started automatically on the install. If not running "service crond start" will start it.

P.S. It may be that during your original install you saw "anacron" which is a somewhat different animal so didn't think you needed vixie-cron. I have anancron installed but never use it.

Last edited by MensaWater; 12-20-2006 at 08:58 AM.
 
Old 12-20-2006, 08:19 PM   #15
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
ok it works fine now thanks

i thought vixie-cron was a 3rd party personal version of it (like anacron) i guess not?
 
  


Reply

Tags
cron, crontab, crontabs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
about crontab shipon_97 Linux - General 1 02-28-2006 05:22 AM
crontab Xris718 Linux - General 5 08-15-2005 01:03 PM
crontab -e hoover93 Linux - Newbie 2 08-06-2004 04:05 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
crontab alaios Linux - General 5 05-01-2003 03:26 PM


All times are GMT -5. The time now is 08:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration