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.
cron questions
Re: cron questions
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
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

- Tim CowChip
- Posts: 304
- Joined: 27. May 2011, 03:35
- Location: Cascade Locks, OR
Re: cron questions
Code: Select all
sudo /usr/sbin/crond restart
Code: Select all
crontab -l
Re: cron questions
You can edit the crontab with crontab -e and the file for root is located at /var/spool/cron/crontabs/root.
-
- Posts: 165
- Joined: 20. Sep 2009, 17:30
- Location: Oxfordshire, UK
Re: cron questions
deja69 wrote: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

Paul.
-
- Posts: 165
- Joined: 20. Sep 2009, 17:30
- Location: Oxfordshire, UK
Re: cron questions
Thanks. I was expecting a script in /etc/rc.d, which is what threw me.Tim CowChip wrote:Code: Select all
sudo /usr/sbin/crond restart
No, but it did point me in the right direction. Too much time spent with Red Hat derived distros.doesshow your cron file?Code: Select all
crontab -l
Paul.
-
- Posts: 165
- Joined: 20. Sep 2009, 17:30
- Location: Oxfordshire, UK
Re: cron questions
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.thenktor wrote:You can edit the crontab with crontab -e and the file for root is located at /var/spool/cron/crontabs/root.
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.