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.
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
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.
#chkconfig crond on
and see if that works
# rpm -qa | grep cron
# chkconfig crond
Install crond, then?
crontabs only puts in:
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
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.
chkconfig crond won't return anything
should set it to run in default runlevels
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
chkconfig --list | grep crond
to streamline things
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".
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. :rolleyes:
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?) :D
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
Setting up repositories
Reading repository metadata in from local files
vixie-cron.x86_64 4:4.1-44.EL4 base
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?
Have you tried
chkconfig --list | grep crond
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.
ok it works fine now thanks :)
i thought vixie-cron was a 3rd party personal version of it (like anacron) i guess not?
|All times are GMT -5. The time now is 02:02 PM.|