You are not logged in.
Pages: 1
Hello, just need a bit of help understanding the change in cron. From what I understand we replaced dcron with cronie and it should be basically seamless, but things have gone south on my system and I'm not sure how it all ties together.
- what is /usr/sbin/crond? How does this relate to dcron or cronie?
- is the /etc/rc.d/crond still supposed to point at /usr/sbin/crond?
- does the new system still use the /etc/cron.hourly|daily|weekly scripts?
I haven't checked my cron for years so I can't fully remember, but I thought the crontab file just contained 4 entries which basically call the scripts in each of those directories. I checked the crontab for my user and root and they are now blank.
Also checked out the hourly|daily|weekly|monthly folders and there are some new 'anacron' related files, how does this fit in? As far as I know I never installed anacron.
Cheers
Offline
Yes, cronie is basically two different cron systems, anacron and crond.
crond works with exact timings, anacron with intervals (in days). Since anacron's minimum interval is one day, and to make things more seamless, cronie has the hourly cron jobs set up in a pseudo-anacron way:
/etc/cron.d/0hourly
01 * * * * root run-parts /etc/cron.hourly
ᶘ ᵒᴥᵒᶅ
Offline
Thanks litemotive, I will have to google anacron a bit, wasn't sure why it was even there.
What about my empty crontabs? Is there supposed to be entries for daily, weekly, monthly?
Offline
With cronie you have two options:
For jobs at regular intervals (hourly/daily/weekly etc.) you can place these in /etc/cron.hourly, /etc/cron.daily etc.
For jobs at fixed times (e.g. 03:45 on monday nights) you can place these in /etc/cron.d/ with the classic cron layout.
I haven't tried crontab with cronie so i'm not sure what happens there, but i would assume it creates symlinks from /etc/cron.d/ to /var/spool/ or something similar?
crontab entries end up in /var/spool/cron which are monitored as well.
Edit: tried out
Last edited by litemotiv (2011-05-03 09:47:11)
ᶘ ᵒᴥᵒᶅ
Offline
Couple of things I've noticed about cronie:
1. It doesn't respect the AFTER= or FREQ= keywords (near as I can tell)
2. Neither the manpage for cron or crontab has the actual crontab format help or examples anymore. Kinda weird
3. There doesn't seem to be a 'per-user' anacron ability unless you add an 'su' in there. Is that expected?
Scott
Offline
3. There doesn't seem to be a 'per-user' anacron ability unless you add an 'su' in there. Is that expected?
Not quite what you meant, but it's possible to use cronie's anacron as a regular user:
1. Create an anacrontab-format file anywhere you want.
2. Make a directory, writable to that user, for anacron to store the timestamps in.
3. anacron -S /path/to/user/spool/directory -T /path/to/user/anacrontab
4. Put the above command in the user's crontab at whatever frequency you want it checked.
Offline
Pages: 1