Mailinglist Archive: opensuse (946 mails)

< Previous Next >
Re: [opensuse] logrotate
On 2017-09-15 19:42, Per Jessen wrote:
John Andersen wrote:

On 09/15/2017 04:04 AM, Carlos E. R. wrote:

I understand how cron on SUSE works, since decades ago.

Not me.

I've had to read the man page or work from a template every time I
wanted to do anything with Crontab. It was obtuse as hell the day it
was written
and hadn't improved with age. Having three different man pages all
with the same name didn't help.

I find it easier to do the systemd way.
systemctl list-timers --all

It give you everything you need to track down what's going to happen
and when. They are easy to set up as well.

Umm, well - a matter of perspective perhaps.

Creating a cron job - edit /etc/cron.d/mycronjob, add one line, save and
exit. Hopefully you remember the syntax.

Creating a systemd timer -

- create the service unit - edit /etc/systemd/system/mycronjob.service,
maybe 4-5 lines. Hopefully you remember the syntax.
- create the timer - edit /etc/systemd/system/mycronjob.timer, maybe 4-5
lines. Hopefully you remember the syntax.
then systemctl daemon-reload

I actually don't mind that, I just wanted to compare.

Hum.


What I find less easy is to tell when cronjob is going to fire

a) at 30 minutes past every 3rd hour.
b) at 2,17,32,47 minutes past every hour
c) 10 past midnight on the 1st of the month.
d) Sunday at 04:00.

LOL. Those are not actually cronjobs :-P

It is a script concoction SuSE made many years ago. More than two
decades ago, I think. And it got much easier on recent versions to control.

On a computer that runs 24*7, they will run same time as yesterday :-P

--
Cheers / Saludos,

Carlos E. R.
(from 42.2 x86_64 "Malachite" at Telcontar)

< Previous Next >