Re: Protect a cron job from systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, 2 Jan 2013 11:07:01 +0200 (EET)
Dimitrios Apostolou <jimis@xxxxxxx> wrote:

> Hello list,
> 
> among various tasks, I also run "sysstat" for monitoring my server's
> load. The way it runs by default is via the hourly cron, as a job
> that lasts exactly one hour. Sometimes I need to stop crond
> (systemctl stop dcron) to perform some short maintainance, and
> restart it a minute later that I'm done.
> 
> Previously the "sadc" monitoring process of sysstat wasn't being
> killed, since it double forked and stayed up as a daemon.
> Unfortunately now systemd kills the whole cgroup, and in this manner
> it's possible to lose up to one hour of accounting logs. Any ideas on
> how to instruct systemd to not kill it when terminating crond?
> 
> 
> Thanks in advance,
> Dimitris
> 
As a sidenote:
You could use a systemd timer unit instead of cron. You can start/stop
them on a per unit basis instead of having to kill off the whole of
cron.


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux