Page 1 of 1
cron questions
Posted: 24. Apr 2012, 23:18
by toothandnail
Two dumb cron questions. I've not really ever had to make changes to cron in Slackware or Slack-based distros, so I'm a bit lost....
First, is there anything special I need to do to get a crontab recognized? I need the extra granularity it provides, but even though I've added /etc/crontab, it doesn't seem to be being picked up. I'm using this sort of format:
30 1 * * * * root <path-to-command-to-execute>
Second, how do I restart crond? A google search found some mention of /etc/init.d/cron restart, but there is no cron file in init.d, so I'm a bit lost there as well.
Paul.
Re: cron questions
Posted: 25. Apr 2012, 00:03
by deja69
Im by no means a geek,and im sure someone more clued up will get to you soon.
But this link might give you a head start maybe
http://www.unixgeeks.org/security/newbi ... ron-1.html
http://www.foogazi.com/2006/12/07/under ... 5-minutes/
Best of luck toothandnail

Re: cron questions
Posted: 25. Apr 2012, 02:00
by Tim CowChip
does
show your cron file?
Re: cron questions
Posted: 25. Apr 2012, 07:39
by thenktor
You can edit the crontab with crontab -e and the file for root is located at /var/spool/cron/crontabs/root.
Re: cron questions
Posted: 25. Apr 2012, 07:47
by toothandnail

Thanks. Found the problem, eventually. Those are useful references.
Paul.
Re: cron questions
Posted: 25. Apr 2012, 07:49
by toothandnail
Thanks. I was expecting a script in /etc/rc.d, which is what threw me.
does
show your cron file?
No, but it did point me in the right direction. Too much time spent with Red Hat derived distros.
Paul.
Re: cron questions
Posted: 25. Apr 2012, 07:52
by toothandnail
thenktor wrote:You can edit the crontab with crontab -e and the file for root is located at /var/spool/cron/crontabs/root.
Thanks. That's what I did in the end. Which showed a completely different crontab to the one I'd created. Knowing where the operational crontab is stored helps as well.
I look after a number of SME servers (SME is CentOS based). CentOS stores a single crontab in /etc. and specifies a user on each command. Must be a different cron implementation. I think I prefer the Slack way...
Paul.