You are not logged in.

#1 2011-05-03 05:36:53

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Cronie changes

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

#2 2011-05-03 07:35:30

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Cronie changes

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

#3 2011-05-03 09:21:38

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Re: Cronie changes

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

#4 2011-05-03 09:42:12

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Cronie changes

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

#5 2011-05-03 17:59:45

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Cronie changes

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

#6 2011-05-03 18:30:35

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Cronie changes

firecat53 wrote:

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

#7 2011-05-03 18:54:07

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Cronie changes

@ataraxia -- ah, how simple! Thanks smile

Scott

Offline

Board footer

Powered by FluxBB